Example #1
0
        public void PartOne()
        {
            var input    = Helpers.FileHelper.ParseFile(InputFile);
            var detector = new AllergenDetector(input);

            int count = detector.CountNonAllergenOccurrence();

            Assert.IsTrue(count == 2078);
        }
Example #2
0
        public void Test_KnownAllergens()
        {
            var input    = Helpers.FileHelper.ParseFile(TestFile);
            var detector = new AllergenDetector(input);

            int count = detector.CountNonAllergenOccurrence();

            Assert.IsTrue(count == 5);

            string danger = detector.GetCanonicalDangerousIngredientList();

            Assert.IsTrue(danger == "mxmxvkd,sqjhc,fvjkl");
        }