Ejemplo n.º 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);
        }
Ejemplo n.º 2
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);
        }
Ejemplo n.º 3
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;
        }
Ejemplo n.º 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());
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 6
0
        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);
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 8
0
        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);
        }
Ejemplo n.º 9
0
 public MayonnaiseAdapter(EggYolk eggYolk, OliveOil oil)
     : base(eggYolk, oil)
 {
 }
Ejemplo n.º 10
0
 public OliveOilAdapter()
 {
     this.oil = new OliveOil();
 }
Ejemplo n.º 11
0
 public OliveOilAdapter()
 {
     this.oil = new OliveOil();
 }
Ejemplo n.º 12
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());
        }