public void DefaultOrganicIngredients() { //Arrange Ingredient garlic = new Garlic(null, DEFAULT_UNIT_SIZE); Ingredient oliveOil = new OliveOil(null, DEFAULT_UNIT_SIZE); //Assert Assert.IsTrue(garlic.IsOrganic); Assert.IsTrue(oliveOil.IsOrganic); }
public Mayonnaise(EggYolk eggYolk, OliveOil oil) { if (eggYolk == null) { throw new ArgumentNullException("eggYolk"); } if (oil == null) { throw new ArgumentNullException("oil"); } this.eggYolk = eggYolk; this.oil = oil; }
public void WellnessDiscountShouldNotExceedSubtotal() { //Arrange Ingredient oliveOil = new OliveOil(null, DEFAULT_UNIT_SIZE); //Assert Assert.IsTrue(oliveOil.getSubtotal() >= oliveOil.getWellnessDiscount()); //Act oliveOil.setWellnessDiscount(1.1); //Assert Assert.IsTrue(oliveOil.getSubtotal() >= oliveOil.getWellnessDiscount()); }
public MayonnaiseAdapter( EggYolk yolk, OliveOil oil) { if (yolk == null) { throw new ArgumentNullException("yolk"); } if (oil == null) { throw new ArgumentNullException("oil"); } this.mayo = new Mayonnaise(yolk, oil); }
public Vinaigrette(Vinegar vinegar, OliveOil oil) { if (vinegar == null) { throw new ArgumentNullException("vinegar"); } if (oil == null) { throw new ArgumentNullException("oil"); } this.vinegar = vinegar; this.oil = oil; }
public MayonnaiseAdapter(EggYolk eggYolk, OliveOil oil) : base(eggYolk, oil) { }
public OliveOilAdapter() { this.oil = new OliveOil(); }