示例#1
0
        public void HaveFullStomachWhenToldToEatPizza()
        {
            //Arrange
            var employee = new TestingExample.Employee();

            //Act
            employee.EatPizza();
            //Assert
            Assert.IsTrue(employee.IsFull);
        }
示例#2
0
        public void Gain200CaleriesWhenEatingAPepperoniPizzaSlice()
        {
            //Arrange
            var employee = new TestingExample.Employee();
            var slice    = Mock.Create <SliceOfPizza>();

            Mock.Arrange(() => slice.CalculateCalories()).Returns(200);
            //Act
            employee.EatPizza(slice);
            //Assert
            Assert.AreEqual(200, employee.Calories);
        }