Search in sources :

Example 1 with AttributesTestHelper

use of org.adempiere.mm.attributes.api.impl.AttributesTestHelper in project metasfresh-webui-api by metasfresh.

the class AvailableToPromiseAdapterTests method init.

@Before
public void init() {
    AdempiereTestHelper.get().init();
    final AvailableToPromiseRepository stockRepository = new AvailableToPromiseRepository();
    attributesTestHelper = new AttributesTestHelper();
    availableToPromiseAdapter = new AvailableToPromiseAdapter(stockRepository);
}
Also used : AvailableToPromiseRepository(de.metas.material.dispo.commons.repository.AvailableToPromiseRepository) AttributesTestHelper(org.adempiere.mm.attributes.api.impl.AttributesTestHelper) Before(org.junit.Before)

Example 2 with AttributesTestHelper

use of org.adempiere.mm.attributes.api.impl.AttributesTestHelper in project metasfresh-webui-api by metasfresh.

the class MaterialCockpitRowFactoryTest method init.

@BeforeEach
public void init() {
    AdempiereTestHelper.get().init();
    attributesTestHelper = new AttributesTestHelper();
    final I_M_Product_Category productCategory = newInstance(I_M_Product_Category.class);
    productCategory.setName("productCategoryName");
    save(productCategory);
    final I_C_UOM uom = newInstance(I_C_UOM.class);
    saveRecord(uom);
    product = newInstance(I_M_Product.class);
    product.setValue("productValue");
    product.setName("productName");
    product.setIsStocked(true);
    product.setC_UOM_ID(uom.getC_UOM_ID());
    product.setM_Product_Category_ID(productCategory.getM_Product_Category_ID());
    save(product);
    attr1 = attributesTestHelper.createM_Attribute("test1", X_M_Attribute.ATTRIBUTEVALUETYPE_List, true);
    attr1_value1 = attributesTestHelper.createM_AttributeValue(attr1, "test1_value1");
    attr2 = attributesTestHelper.createM_Attribute("test21", X_M_Attribute.ATTRIBUTEVALUETYPE_List, true);
    attr2_value1 = attributesTestHelper.createM_AttributeValue(attr2, "test2_value1");
    attr2_value2 = attributesTestHelper.createM_AttributeValue(attr2, "test2_value2");
    initDimenstionSpec();
    materialCockpitRowFactory = new MaterialCockpitRowFactory();
}
Also used : I_M_Product(org.compiere.model.I_M_Product) AttributesTestHelper(org.adempiere.mm.attributes.api.impl.AttributesTestHelper) I_C_UOM(org.compiere.model.I_C_UOM) I_M_Product_Category(org.compiere.model.I_M_Product_Category) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

AttributesTestHelper (org.adempiere.mm.attributes.api.impl.AttributesTestHelper)2 AvailableToPromiseRepository (de.metas.material.dispo.commons.repository.AvailableToPromiseRepository)1 I_C_UOM (org.compiere.model.I_C_UOM)1 I_M_Product (org.compiere.model.I_M_Product)1 I_M_Product_Category (org.compiere.model.I_M_Product_Category)1 Before (org.junit.Before)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1