public FullHoursGenerator_EXPLORATION_Tests()
        {
            TwoDigitsUniqueNumberGenerator numberGenerator   = new TwoDigitsUniqueNumberGenerator();
            HourPartialsGenerator          partialsGenerator = new HourPartialsGenerator(numberGenerator);

            _hoursGenerator = new FullHoursGenerator(partialsGenerator);
        }
        public UnitTest1()
        {
            IHourProcessor         _hourProcessor         = new HourProcessor();
            IUniqueNumberGenerator _numberGenerator       = new TwoDigitsUniqueNumberGenerator();
            IHourPartialsGenerator _hourPartialsGenerator = new HourPartialsGenerator(_numberGenerator);
            IFullHoursGenerator    _hoursGenerator        = new FullHoursGenerator(_hourPartialsGenerator);

            _solutionImpl = new Solution(_hourProcessor, _hoursGenerator);
        }
        public void GetAllPossibleHours_GetsAStandardSet_ReturnsAllPossibleHours(int[] digits, string[] allCombinations)
        {
            var generator         = new TwoDigitsUniqueNumberGenerator();
            var numberGenerator   = new HourPartialsGenerator(generator);
            var fullHourGenerator = new FullHoursGenerator(numberGenerator);
            //_solutionImpl = new Solution(_processorMock.Object, fullHourGenerator);

            var result = fullHourGenerator.GetAllPossibleHours(digits.ToList());

            result.Select(h => h.To24HourFormatString())
            .Should()
            .BeEquivalentTo(allCombinations.ToList());
        }
示例#4
0
        static void Main(string[] args)
        {
            IHourProcessor         _hourProcessor         = new HourProcessor();
            IUniqueNumberGenerator _numberGenerator       = new TwoDigitsUniqueNumberGenerator();
            IHourPartialsGenerator _hourPartialsGenerator = new HourPartialsGenerator(_numberGenerator);
            IFullHoursGenerator    _hoursGenerator        = new FullHoursGenerator(_hourPartialsGenerator);

            var proc = new Solution(_hourProcessor, _hoursGenerator);

            var hour = proc.solution(1, 8, 3, 2, 6, 4);

            Console.WriteLine(hour);

            Console.ReadKey();
        }
示例#5
0
        static void Main(string[] args)
        {
            var processor         = new HourProcessor();
            var generator         = new TwoDigitsUniqueNumberGenerator();
            var hourGenerator     = new HourPartialsGenerator(generator);
            var fullHourGenerator = new FullHoursGenerator(hourGenerator);

            var proc = new Solution(processor, fullHourGenerator);

            var hour = proc.Execute(1, 8, 3, 2, 6, 4);


            Console.WriteLine(hour);

            Console.ReadKey();
        }