コード例 #1
0
ファイル: UnitTest1.cs プロジェクト: AlexandRLV/MyHomeWork
        public void TestMethod1()
        {
            Components c = new CoffeeComponent();

            c.ReadComponents("Components.txt");
            Recipe r = new CoffeeRecipe("A", 20);

            r.AddComponent("Water", 10000);
            Recipe r2 = new CoffeeRecipe("A", 20);

            r2.AddComponent("Water", 10);
            r2.AddComponent("Coffee", 10);
            bool b  = c.CheckRecipe(r);
            bool b2 = c.CheckRecipe(r2);

            Assert.AreEqual(b, false);
            Assert.AreEqual(b2, true);
        }