예제 #1
0
        public void Example2()
        {
            var parser = new BagRegulationParser();

            var testreg = "shiny gold bags contain 1 dark olive bag, 2 vibrant plum bags.";

            var actual = parser.NormalizeRegulation(testreg);

            var expected = "shiny_gold=dark_olive|vibrant_plum|vibrant_plum";

            Assert.AreEqual(expected, actual);
        }
예제 #2
0
        public void Example3()
        {
            var parser = new BagRegulationParser();

            var testreg = "dotted black bags contain no other bags.";

            var actual = parser.NormalizeRegulation(testreg);

            var expected = "dotted_black=";

            Assert.AreEqual(expected, actual);
        }
예제 #3
0
        public void Example1()
        {
            var parser = new BagRegulationParser();

            var testreg = "bright white bags contain 1 shiny gold bag.";

            var actual = parser.NormalizeRegulation(testreg);

            var expected = "bright_white=shiny_gold";

            Assert.AreEqual(expected, actual);
        }