예제 #1
0
        public void CalcBread_EnterNegativeInt_error()
        {
            //Arrange
            Bread testBread = new Bread();

            //Act
            testBread.CalcBread(-11);
            //Assert
            Assert.AreEqual(-55, testBread.BreadPrice);
        }
예제 #2
0
        public void CalcBread_Buy11LoavesWithDiscount_40()
        {
            //Arrange
            Bread testBread = new Bread();

            //Act
            testBread.CalcBread(11);
            //Assert
            Assert.AreEqual(40, testBread.BreadPrice);
        }
예제 #3
0
        public void CalcBread_Buy10LoavesWithDiscount_35()
        {
            //Arrange
            Bread testBread = new Bread();

            //Act
            testBread.CalcBread(10);
            //Assert
            Assert.AreEqual(35, testBread.BreadPrice);
        }
예제 #4
0
        public void CalcBread_Buy3LoavesForPriceof2_10()
        {
            //Arrange
            Bread testBread = new Bread();

            //Act
            testBread.CalcBread(3);
            //Assert
            Assert.AreEqual(10, testBread.BreadPrice);
        }
예제 #5
0
        public void CalcBread_CalculatePricefor2LoafofBread_10()
        {
            //Arrange
            Bread testBread = new Bread();

            //Act
            testBread.CalcBread(2);
            //Assert
            Assert.AreEqual(10, testBread.BreadPrice);
        }
예제 #6
0
        public void CalcBread_CalculatePricefor1LoafofBread_5()
        {
            //Arrange
            Bread testBread = new Bread();

            //Act
            testBread.CalcBread(1);
            //Assert
            Assert.AreEqual(testBread.BreadPrice, 5);
        }