Class AbstractCommerceServicelayerTransactionalTest

    • Constructor Detail

      • AbstractCommerceServicelayerTransactionalTest

        public AbstractCommerceServicelayerTransactionalTest()
    • Method Detail

      • save

        public void save​(java.lang.Object modelToSave)
      • createProduct

        public ProductModel createProduct​(java.lang.String code,
                                          CatalogVersionModel catalogVersion,
                                          java.lang.String variantTypeCode,
                                          UnitModel unit,
                                          CategoryModel... superCategories)
        Parameters:
        code -
        catalogVersion -
        variantTypeCode - The type code of the variant, usually it can be retrieved from the variant class it self. E.g. if your variant type is VariantProduct its type code can be retrieved by calling VariantProductModel._TYPECODE
        unit - Unit that this product is measured in
        superCategories -
        Returns:
        created product
      • createCatalogVersion

        public CatalogVersionModel createCatalogVersion​(java.lang.String catalogId,
                                                        java.lang.String catalogVersion)
      • createCatalog

        public CatalogModel createCatalog​(java.lang.String catalogId)
      • getDefaultCatalogId

        public java.lang.String getDefaultCatalogId()
      • getDefaultCatalogVersion

        public java.lang.String getDefaultCatalogVersion()
      • createUnit

        public UnitModel createUnit​(java.lang.String code)
      • createVariantType

        public VariantTypeModel createVariantType​(java.lang.String variantTypeCode)
      • setCategoryService

        public void setCategoryService​(CategoryService categoryService)
      • setModelService

        public void setModelService​(ModelService modelService)