Class DataImportTestUtils

java.lang.Object
de.hybris.platform.dataimportcommons.facades.DataImportTestUtils

public class DataImportTestUtils extends Object
  • Method Details

    • error

      public static DataImportError error(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 Collection<DataImportError> errors(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(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.