示例#1
0
 @Override
 protected void tearDown() throws Exception {
   RemoteOperationResult removeResult = mActivity.removeFile(mFullPath2SharedFile);
   if (!removeResult.isSuccess() && removeResult.getCode() != ResultCode.TIMEOUT) {
     Utils.logAndThrow(LOG_TAG, removeResult);
   }
   super.tearDown();
 }
示例#2
0
  @Override
  protected void setUp() throws Exception {
    super.setUp();
    setActivityInitialTouchMode(false);
    mActivity = getActivity();
    mFullPath2SharedFile = mBaseFolderPath + SHARED_FILE;

    File textFile = mActivity.extractAsset(TestActivity.ASSETS__TEXT_FILE_NAME);
    RemoteOperationResult result =
        mActivity.uploadFile(textFile.getAbsolutePath(), mFullPath2SharedFile, "txt/plain");
    if (!result.isSuccess()) {
      Utils.logAndThrow(LOG_TAG, result);
    }

    result = mActivity.createShare(mFullPath2SharedFile, ShareType.PUBLIC_LINK, "", false, "", 1);
    if (!result.isSuccess() && result.getCode() != ResultCode.TIMEOUT) {
      Utils.logAndThrow(LOG_TAG, result);
    }
  }