Exemple #1
0
        public void ShouldBeAbleToSetTheWeightOfHops()
        {
            var hop = new Hop("Saaz");

            var recipe = new Recipe();
            recipe.AddHop(hop, new Weight(10, MassUnit.Grams), 60);

            Assert.AreEqual(new Weight(10, MassUnit.Grams), recipe.GetTotalHopWeight());
        }
Exemple #2
0
        public void ShouldHandleGramsAndKilograms()
        {
            var hop1 = new Hop("Saaz 1");
            var hop2 = new Hop("Saaz 2");

            var recipe = new Recipe();
            recipe.AddHop(hop1, new Weight(10, MassUnit.Grams), 60);
            recipe.AddHop(hop2, new Weight(1, MassUnit.KiloGrams), 60);

            Assert.AreEqual(new Weight(1010, MassUnit.Grams), recipe.GetTotalHopWeight());
        }