コード例 #1
0
        public void Description_Of_Cheeseburger_With_PepperSauce()
        {
            Expect.Call(this.sandwichMock.Description).Return("Sandwich description");

            this.mocks.ReplayAll();

            this.pepperSauce = new PepperSauce(this.sandwichMock);
            Assert.AreEqual<string>("Sandwich description, Pepper Sauce", this.pepperSauce.Description);

            this.mocks.VerifyAll();
        }
コード例 #2
0
        public void Calories_Of_Cheeseburger_With_PepperSauce()
        {
            Expect.Call(this.sandwichMock.Calories()).Return(100);

            this.mocks.ReplayAll();

            this.pepperSauce = new PepperSauce(this.sandwichMock);
            Assert.AreEqual<int>(120, this.pepperSauce.Calories());

            this.mocks.VerifyAll();
        }