Class DataImportTestUtils
- java.lang.Object
-
- de.hybris.platform.dataimportcommons.facades.DataImportTestUtils
-
public class DataImportTestUtils extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DataImportErrorerror(java.lang.String msg)Simulates an import error with the specified message.static java.util.Collection<DataImportError>errors(java.lang.String... messages)Simulates an import error for each message submitted.static ImportResultimportResult(java.lang.String impexFileLoc)Mocks an import result, which is wired up with the CronJobModel and WorkMedia.static ImportResultsuccessfulImportResult()Mocks a successful import result.
-
-
-
Method Detail
-
error
public static DataImportError error(java.lang.String msg)
Simulates an import error with the specified message.- Parameters:
msg- an error message for the error.- Returns:
- an import error
-
errors
public static java.util.Collection<DataImportError> errors(java.lang.String... messages)
Simulates an import error for each message submitted.- Parameters:
messages- an array of messages to convert to import errors- Returns:
- a collection of import errors with the specified messages.
-
successfulImportResult
public static ImportResult successfulImportResult()
Mocks a successful import result.- Returns:
- the mocked result.
-
importResult
public static ImportResult importResult(java.lang.String impexFileLoc)
Mocks an import result, which is wired up with the CronJobModel and WorkMedia. The result is neither successful nor erroneous and should be further mocked for that purpose.- Parameters:
impexFileLoc- path to the source of the impex file being imported, which is relative to the hybris server data directory.- Returns:
- the mocked result.
-
-