public void Get_Description_And_Calculate_Cost() { Pizza largePizza = new LargePizza(); Assert.Equal("Large Pizza", largePizza.GetDescription()); Assert.Equal(9, largePizza.CalculateCost()); }
public void ReturnDescription_WhenGetDescriptionIsCalled() { var expectedDescription = "Large Pizza"; var largePizza = new LargePizza(); var actualDescription = largePizza.GetDescription(); actualDescription.Should().Be(expectedDescription); }
public void GetDescription_Returns_LargePizza() { //Arrange var largePizza = new LargePizza(); //Act var description = largePizza.GetDescription(); //Assert Assert.AreEqual("Large Pizza", description); }
public static void Bake() { Pizza pizza = new LargePizza(); Console.WriteLine($"{pizza.CalculateCost()}EUR for {pizza.GetDescription()}"); pizza = new Ham(pizza); Console.WriteLine($"{pizza.CalculateCost()}EUR for {pizza.GetDescription()}"); pizza = new Cheese(pizza); Console.WriteLine($"{pizza.CalculateCost()}EUR for {pizza.GetDescription()}"); pizza = new Corn(pizza); Console.WriteLine($"{pizza.CalculateCost()}EUR for {pizza.GetDescription()}"); pizza = new Cheese(pizza); Console.WriteLine($"{pizza.CalculateCost()}EUR for {pizza.GetDescription()}"); }