Class UtilsForTests

java.lang.Object
com.atlassian.core.ofbiz.test.UtilsForTests

public class UtilsForTests extends Object
  • Constructor Details

    • UtilsForTests

      public UtilsForTests()
  • Method Details

    • getTestEntity

      public static org.ofbiz.core.entity.GenericValue getTestEntity(String entity, Map fields)
      Get a test Entity
      Parameters:
      entity - the name of the entity
      fields - the field values
      Returns:
      the created GenericValue
      Throws:
      UtilsForTests.EntityException - if OfBiz throws a GenericEntityException
    • getTestConstant

      public static org.ofbiz.core.entity.GenericValue getTestConstant(String entity, Map params)
    • cleanWebWork

      public static void cleanWebWork()
    • cleanOFBiz

      public static void cleanOFBiz()
    • checkSingleElementCollection

      public static void checkSingleElementCollection(Collection collection, Object expected)
      Check that a collection has only one element, and that is the object provided