public void TestEmpty()
        {
            Recipe testRecipe = new Recipe();
            FermVessel testFermVessel = new FermVessel();
            int starting = testRecipe.time;

            testFermVessel.Add(testRecipe.output,
                testRecipe.brewQty, testRecipe.time);

            testFermVessel.Empty();

            Assert.IsTrue(testFermVessel.isEmpty());
        }
        public void TestAge()
        {
            Recipe testRecipe = new Recipe();
            FermVessel testFermVessel = new FermVessel();
            int starting = testRecipe.time;

            testFermVessel.Add(testRecipe.output,
                testRecipe.brewQty, testRecipe.time);

            testFermVessel.Age(1);

            Assert.AreEqual(starting - 1, testFermVessel.timeRemaining);
        }
        public void TestAddRecipe()
        {
            Company testCompany = new Company("testco", 1000);
            Recipe testRecipe = new Recipe();

            // Starts at 0
            Assert.AreEqual(0, testCompany.recipes.Count);

            // Add 1
            Assert.IsTrue(testCompany.Add(testRecipe));
            Assert.AreEqual(1, testCompany.recipes.Count);

            // Add another
            Assert.IsTrue(testCompany.Add(testRecipe));
            Assert.AreEqual(2, testCompany.recipes.Count);
        }
        public void TestAdd()
        {
            Recipe testRecipe = new Recipe();
            FermVessel testFermVessel = new FermVessel();

            // Able to add recipe successfully?
            bool success = testFermVessel.Add(testRecipe.output,
                testRecipe.brewQty, testRecipe.time);
            Assert.IsTrue(success);

            Assert.AreEqual(testRecipe.output,
                testFermVessel.storedBrew);
        }
Exemple #5
0
 public bool Add(Recipe inRecipe)
 {
     recipes.Add(inRecipe);
     return true;
 }