Example #1
0
        public void ShouldReturnExpectedValueWhenCalculatingQuantity()
        {
            Product product1 = new Product("Pastelina", (decimal)1.50, 10);
            Product product2 = new Product("Pastelina", (decimal)1.50, 5);

            //1.50 * 5
            SystemVendorMachine vendorMachine = new SystemVendorMachine();

            Assert.Equal((decimal)7.5, vendorMachine.amountProductPriceSelected(product1, product2));
            Assert.True((decimal)7.5 == vendorMachine.amountProductPriceSelected(product1, product2));
        }
Example #2
0
        public void ShouldReturnDifferentValueThanExpected()
        {
            Product product1 = new Product("Pastelina", (decimal)1.50, 10);
            Product product2 = new Product("Pastelina", (decimal)1.50, 5);

            SystemVendorMachine vendorMachine = new SystemVendorMachine();

            Assert.False((decimal)8.5 == vendorMachine.amountProductPriceSelected(product1, product2));
        }