コード例 #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);
        }