コード例 #1
0
        public void TestMethod9_Scenario_NegativeQuantities()
        {
            string        fName      = "Input09";
            IReaderWriter readWrite  = new TextReaderWriter(fName);
            RuleEngine    ruleEngine = new RuleEngine(readWrite);
            string        actual     = ruleEngine.Start();

            readWrite.Write(actual);
            readWrite.ReadLine();
            string expected = readWrite.ReadLine();

            Assert.AreEqual(expected, actual);
        }
コード例 #2
0
        public void TestMethod6_Scenario_NoProduct_NoRule()
        {
            string        fName      = "Input06";
            IReaderWriter readWrite  = new TextReaderWriter(fName);
            RuleEngine    ruleEngine = new RuleEngine(readWrite);
            string        actual     = ruleEngine.Start();

            readWrite.Write(actual);
            readWrite.ReadLine();
            string expected = readWrite.ReadLine();

            Assert.AreEqual(expected, actual);
        }
コード例 #3
0
        public void TestMethod8_Scenario_RuleDefinedForNonExistingProduct()
        {
            string        fName      = "Input08";
            IReaderWriter readWrite  = new TextReaderWriter(fName);
            RuleEngine    ruleEngine = new RuleEngine(readWrite);
            string        actual     = ruleEngine.Start();

            readWrite.Write(actual);
            readWrite.ReadLine();
            string expected = readWrite.ReadLine();

            Assert.AreEqual(expected, actual);
        }