Skip to content
Snippets Groups Projects
Commit 1230ad7d authored by Andy Summers's avatar Andy Summers
Browse files

Add new attributes to `ProductInputParametersMapperTest`

parent 5617d880
No related branches found
No related tags found
1 merge request!58Update tests for CBS QA APIs
...@@ -16,6 +16,7 @@ class ProductInputParametersMapperTest extends \PHPUnit_Framework_TestCase ...@@ -16,6 +16,7 @@ class ProductInputParametersMapperTest extends \PHPUnit_Framework_TestCase
->setSku('itemNumber') ->setSku('itemNumber')
->setName('name') ->setName('name')
->setCategory('category') ->setCategory('category')
->setCbsItemTemplate(1389)
->setManufacturer('manufacturer') ->setManufacturer('manufacturer')
->setManufacturerPartNumber('manufacturerPartNumber') ->setManufacturerPartNumber('manufacturerPartNumber')
->setCost(Money::USD(99)) ->setCost(Money::USD(99))
...@@ -25,7 +26,16 @@ class ProductInputParametersMapperTest extends \PHPUnit_Framework_TestCase ...@@ -25,7 +26,16 @@ class ProductInputParametersMapperTest extends \PHPUnit_Framework_TestCase
->setSerialControlFlag('serialCtrlFlag') ->setSerialControlFlag('serialCtrlFlag')
->setVendor('vendor') ->setVendor('vendor')
->setVendorPartNumber('vendorPartNumber') ->setVendorPartNumber('vendorPartNumber')
->setUpc('upc'); ->setUpc('upc')
->setBasePrice(5.0)
->setPricingTemplate('template')
->setReference('reference')
->setCostCenter('A123456')
->setPlannerCode('code')
->setMinMaxActive('no')
->setBuyer('Bucky Badger')
->setProductManager('Bucky Badger')
->setTestMode('yesplz');
$inputParameters = ProductInputParametersMapper::toInputParameters( $inputParameters = ProductInputParametersMapper::toInputParameters(
$product, $product,
...@@ -35,6 +45,7 @@ class ProductInputParametersMapperTest extends \PHPUnit_Framework_TestCase ...@@ -35,6 +45,7 @@ class ProductInputParametersMapperTest extends \PHPUnit_Framework_TestCase
static::assertEquals($product->getSku(), $inputParameters->getP_ITEM_NUMBER()); static::assertEquals($product->getSku(), $inputParameters->getP_ITEM_NUMBER());
static::assertEquals($product->getName(), $inputParameters->getP_ITEM_DESCRIPTION()); static::assertEquals($product->getName(), $inputParameters->getP_ITEM_DESCRIPTION());
static::assertEquals($product->getCategory(), $inputParameters->getP_ITEM_CATEGORY()); static::assertEquals($product->getCategory(), $inputParameters->getP_ITEM_CATEGORY());
static::assertEquals($product->getCbsItemTemplate(), $inputParameters->getP_CBS_ITEM_TEMPLATE());
static::assertEquals($product->getManufacturer(), $inputParameters->getP_MANUFACTURER_NAME()); static::assertEquals($product->getManufacturer(), $inputParameters->getP_MANUFACTURER_NAME());
static::assertEquals($product->getManufacturerPartNumber(), $inputParameters->getP_MANUFACTURER_PART_NUMBER()); static::assertEquals($product->getManufacturerPartNumber(), $inputParameters->getP_MANUFACTURER_PART_NUMBER());
static::assertTrue( static::assertTrue(
...@@ -47,6 +58,15 @@ class ProductInputParametersMapperTest extends \PHPUnit_Framework_TestCase ...@@ -47,6 +58,15 @@ class ProductInputParametersMapperTest extends \PHPUnit_Framework_TestCase
static::assertEquals($product->getVendor(), $inputParameters->getP_VENDOR()); static::assertEquals($product->getVendor(), $inputParameters->getP_VENDOR());
static::assertEquals($product->getVendorPartNumber(), $inputParameters->getP_SUPPLIER_PART_NUMBER()); static::assertEquals($product->getVendorPartNumber(), $inputParameters->getP_SUPPLIER_PART_NUMBER());
static::assertEquals($product->getUpc(), $inputParameters->getP_UPC()); static::assertEquals($product->getUpc(), $inputParameters->getP_UPC());
static::assertEquals($product->getBasePrice(), $inputParameters->getP_BASE_PRICE());
static::assertEquals($product->getPricingTemplate(), $inputParameters->getP_PRICING_TEMPLATE());
static::assertEquals($product->getReference(), $inputParameters->getP_REFERENCE());
static::assertEquals($product->getCostCenter(), $inputParameters->getP_COST_CENTER());
static::assertEquals($product->getPlannerCode(), $inputParameters->getP_PLANNER_CODE());
static::assertEquals($product->getMinMaxActive(), $inputParameters->getP_MINMAX_ACTIVE());
static::assertEquals($product->getBuyer(), $inputParameters->getP_BUYER());
static::assertEquals($product->getProductManager(), $inputParameters->getP_PRODUCT_MANAGER());
static::assertEquals($product->getTestMode(), $inputParameters->getP_TEST_MODE());
} }
/** @test */ /** @test */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment