turcsanyip commented on a change in pull request #4438:
URL: https://github.com/apache/nifi/pull/4438#discussion_r463880354
##########
File path:
nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/test/java/org/apache/nifi/processors/azure/storage/AbstractAzureDataLakeStorageIT.java
##########
@@ -82,9 +88,51 @@ protected void uploadFile(String directory, String filename,
String fileContent)
fileClient.flush(fileContentBytes.length);
}
+ protected void uploadFile(TestFile testFile) {
+ uploadFile(testFile.getDirectory(), testFile.getFilename(),
testFile.getFileContent());
+ }
+
protected void createDirectoryAndUploadFile(String directory, String
filename, String fileContent) {
- fileSystemClient.createDirectory(directory);
+ createDirectory(directory);
uploadFile(directory, filename, fileContent);
}
+
+ protected void createDirectoryAndUploadFile(TestFile testFile) {
+ createDirectoryAndUploadFile(testFile.getDirectory(),
testFile.getFilename(), testFile.getFileContent());
+ }
+
+ protected static class TestFile {
+ private final String directory;
+ private final String filename;
+ private final String fileContent;
+
+ public TestFile(String directory, String filename, String fileContent)
{
+ this.directory = directory;
+ this.filename = filename;
+ this.fileContent = fileContent;
+ }
+
+ public TestFile(String directory, String filename) {
+ this.directory = directory;
+ this.filename = filename;
+ this.fileContent = TEST_FILE_CONTENT;
+ }
Review comment:
done
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]