Suppose we want to make steaks.
Public class Restaurant{
public void MakeSteak(Steak rawSteak) {
this.KitchenServices.AddSeasoning(rawSteak);
this.KitchenServices.Grill(rawSteak);
}
}
In the unit tests, I could make sure that given a raw steak, we both season it and grill it:
public void MakeSteakTest() {
var rawSteak = new Steak();
this.restaurant.MakeSteak(rawSteak);
this.KitchenServices.Verify(x => x.AddSeasoning(rawSteak) , Times.Once);
this.KitchenServices.Verify(x => x.Grill(rawSteak) , Times.Once);
}
My question is that should we have a test to make sure that the steak is not seasoned after it's grilled? If yes, How?