agave-systems/systems-core/src/test/java/org/iplantc/service/transfer/s3/S3RenameIT.java
/**
	 * Generates the prefix or suffixes to use in rename tests.
	 *
	 * @return
	 */
Generates the prefix or suffixes to use in rename tests.
@return
Generates the prefix or suffixes to use in rename tests . @return
@DataProvider(name="renameProvider", parallel = true)
	private Object[][] _renamePrefixOrSuffixProvider() {
		String[] filenameDelimiters = { ".", "-", "_" };
		long tokenToAppendAndPrepend = Instant.now().getMillis();
		List<Object[]> testCases = new ArrayList<Object[]>();
		for (String delimiter: filenameDelimiters) {
			String baseFileItemName = UUID.randomUUID().toString();
			testCases.add(new Object[]{ baseFileItemName, baseFileItemName + delimiter, "Renaming with delimiter appended should not fail"});
			baseFileItemName = UUID.randomUUID().toString();
			testCases.add(new Object[]{ baseFileItemName, baseFileItemName + delimiter + tokenToAppendAndPrepend, "Renaming with delimiter and token appended should not fail"});
			baseFileItemName = UUID.randomUUID().toString();
			testCases.add(new Object[]{ baseFileItemName, delimiter + baseFileItemName, "Renaming with delimiter and token prepended should not fail"});
			baseFileItemName = UUID.randomUUID().toString();
			testCases.add(new Object[]{ baseFileItemName, delimiter + tokenToAppendAndPrepend + baseFileItemName, "Renaming with delimiter and token prepended should not fail"});
			baseFileItemName = UUID.randomUUID().toString();
			testCases.add(new Object[]{ baseFileItemName, delimiter + tokenToAppendAndPrepend + baseFileItemName + delimiter + tokenToAppendAndPrepend, "Renaming with delimiter and token appended and prepended should not fail"});
			baseFileItemName = UUID.randomUUID().toString();
		}
		return testCases.toArray(new Object[][]{});
	}
@ DataProvider ( name = "renameProvider" , parallel = true ) private Object [ ] [ ] _renamePrefixOrSuffixProvider ( ) { String [ ] filenameDelimiters = { "." , "-" , "_" } ; long tokenToAppendAndPrepend = Instant . now ( ) . getMillis ( ) ; List < Object [ ] > testCases = new ArrayList < Object [ ] > ( ) ; for ( String delimiter : filenameDelimiters ) { String baseFileItemName = UUID . randomUUID ( ) . toString ( ) ; testCases . add ( new Object [ ] { baseFileItemName , baseFileItemName + delimiter , "Renaming with delimiter appended should not fail" } ) ; baseFileItemName = UUID . randomUUID ( ) . toString ( ) ; testCases . add ( new Object [ ] { baseFileItemName , baseFileItemName + delimiter + tokenToAppendAndPrepend , "Renaming with delimiter and token appended should not fail" } ) ; baseFileItemName = UUID . randomUUID ( ) . toString ( ) ; testCases . add ( new Object [ ] { baseFileItemName , delimiter + baseFileItemName , "Renaming with delimiter and token prepended should not fail" } ) ; baseFileItemName = UUID . randomUUID ( ) . toString ( ) ; testCases . add ( new Object [ ] { baseFileItemName , delimiter + tokenToAppendAndPrepend + baseFileItemName , "Renaming with delimiter and token prepended should not fail" } ) ; baseFileItemName = UUID . randomUUID ( ) . toString ( ) ; testCases . add ( new Object [ ] { baseFileItemName , delimiter + tokenToAppendAndPrepend + baseFileItemName + delimiter + tokenToAppendAndPrepend , "Renaming with delimiter and token appended and prepended should not fail" } ) ; baseFileItemName = UUID . randomUUID ( ) . toString ( ) ; } return testCases . toArray ( new Object [ ] [ ] { } ) ; }
Generates the prefix or suffixes to use in rename tests.
Generates the prefix or suffixes to use in rename tests .