public SomeExternalVendorProductAdapter(SomeExternalVendorProduct someExternalVendorProduct) { _someExternalVendorProduct = someExternalVendorProduct; //unitPrice = someExternalVendorProduct.PricePerUnit; //barCode = someExternalVendorProduct.EANCode; //title = someExternalVendorProduct.Description; }
public void TestSomeExternalVendorProduct() { SomeExternalVendorProduct testExternalVendorProduct = new SomeExternalVendorProduct{Description = "Cheese", EANCode = "ABC123", PricePerUnit = 12}; Decimal expectedPrice = 12; string expectedDescription = "Cheese"; string expectedEANCode = "ABC123"; SomeExternalVendorProductAdapter adapting = new SomeExternalVendorProductAdapter(testExternalVendorProduct); Assert.AreEqual(expectedPrice, adapting.UnitPrice); Assert.AreEqual(expectedDescription, adapting.Title); Assert.AreEqual(expectedEANCode, adapting.BarCode); }