Example #1
0
        public void OneTimeSetUp()
        {
            _calculator =
                new BathroomCodeCalculator(new List <IKeypad>
            {
                new KeypadPartOne()
            });

            _result =
                _calculator.CalculateCode(
                    "C:\\dev\\Jansson.AdventOfCode\\src\\Jansson.AdventOfCode.DayTwo\\Jansson.AdventOfCode.DayTwo.Tests/TestInput.txt");
        }
Example #2
0
        private static void Main()
        {
            var container = TinyIoCContainer.Current;


            var codeCalculator =
                new BathroomCodeCalculator(
                    new List <IKeypad>
            {
                new KeypadPartOne(),
                new KeypadPartTwo()
            });

            container.Register <ICodeCalculator>(codeCalculator);

            var calculator = container.Resolve <ICodeCalculator>();
            var results    = calculator.CalculateCode(Environment.CurrentDirectory + "/BathroomInput.txt");


            foreach (var result in results)
            {
                Console.WriteLine(result);
            }
        }