public void TestGoFBuilder() { PizzaBuilder pb = new PizzaBuilder(); var myPizza = pb.Build("thin", "normal", "onion", "mushroom", "black olives"); Assert.True(myPizza.IsReady); }
public void TestGoFBuilderForBadArgs() { try { PizzaBuilder pb = new PizzaBuilder(); var myPizza = pb.Build("thin", "normal", "anchovies", "mushroom", "black olives"); Assert.True(false); } catch (Exception ex) { Assert.True(ex is ArgumentException); } }
public void TestGoFBuilderForNullArgs() { try { PizzaBuilder pb = new PizzaBuilder(); var myPizza = pb.Build(null); Assert.True(false); } catch (Exception ex) { Assert.True(true); } }