@Test void exportShouldFailWhenBlobDoesNotExist() { BlobId blobId = blobIdFactory.randomId(); assertThatThrownBy( () -> testee.blobId(blobId) .with(new MailAddress(USER_2.getUsername())) .explanation(EXPLANATION) .noFileCustomPrefix() .fileExtension(FILE_TEXT_EXTENSION) .export()) .isInstanceOf(BlobExportMechanism.BlobExportException.class); }
@Override public ShareeStage blobId(BlobId blobId) { return mailAddress -> explanation -> fileCustomPrefix -> fileExtension -> () -> { try { exportBlob(blobId, mailAddress, fileCustomPrefix, fileExtension); } catch (Exception e) { throw new BlobExportException(String.format("Error while exporting blob %s to %s", blobId.asString(), mailAddress.asString()), e); } }; }
LinshareBlobExportMechanism implements BlobExportMechanism { @Override public ShareeStage blobId(BlobId blobId) { return mailAddress -> explanation -> fileCustomPrefix -> fileExtension -> () -> { try { exportBlob(blobId, mailAddress, fileCustomPrefix, fileExtension); } catch (Exception e) { throw new BlobExportException(String.format("Error while exporting blob %s to %s", blobId.asString(), mailAddress.asString()), e); } }; } }
LinshareBlobExportMechanism implements BlobExportMechanism { @Override public ShareeStage blobId(BlobId blobId) { return mailAddress -> explanation -> fileCustomPrefix -> fileExtension -> () -> { try { exportBlob(blobId, mailAddress, fileCustomPrefix, fileExtension); } catch (Exception e) { throw new BlobExportException(String.format("Error while exporting blob %s to %s", blobId.asString(), mailAddress.asString()), e); } }; } @Inject  LinshareBlobExportMechanism(LinshareAPI linshareAPI, BlobStore blobStore); }
LinshareBlobExportMechanism implements BlobExportMechanism { @Override public ShareeStage blobId(BlobId blobId) { return mailAddress -> explanation -> fileCustomPrefix -> fileExtension -> () -> { try { exportBlob(blobId, mailAddress, fileCustomPrefix, fileExtension); } catch (Exception e) { throw new BlobExportException(String.format("Error while exporting blob %s to %s", blobId.asString(), mailAddress.asString()), e); } }; } @Inject  LinshareBlobExportMechanism(LinshareAPI linshareAPI, BlobStore blobStore); @Override ShareeStage blobId(BlobId blobId); }
LinshareBlobExportMechanism implements BlobExportMechanism { @Override public ShareeStage blobId(BlobId blobId) { return mailAddress -> explanation -> fileCustomPrefix -> fileExtension -> () -> { try { exportBlob(blobId, mailAddress, fileCustomPrefix, fileExtension); } catch (Exception e) { throw new BlobExportException(String.format("Error while exporting blob %s to %s", blobId.asString(), mailAddress.asString()), e); } }; } @Inject  LinshareBlobExportMechanism(LinshareAPI linshareAPI, BlobStore blobStore); @Override ShareeStage blobId(BlobId blobId);  }