Exemple #1
0
        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 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;
        }
Exemple #4
0
        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());
        }
Exemple #5
0
        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 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);
        }
Exemple #7
0
        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 yolk, OliveOil oil)
        {
            if (yolk == null)
            {
                throw new ArgumentNullException("yolk");
            }
            if (oil == null)
            {
                throw new ArgumentNullException("oil");
            }

            this.mayo = new Mayonnaise(yolk, oil);
        }
 public MayonnaiseAdapter(EggYolk eggYolk, OliveOil oil)
     : base(eggYolk, oil)
 {
 }
 public OliveOilAdapter()
 {
     this.oil = new OliveOil();
 }
 public OliveOilAdapter()
 {
     this.oil = new OliveOil();
 }
        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());
        }