public void ShouldReturnCorrectForOddNumber()
        {
            var converter = new OnOffPatternOddnessConverter("Y", "O");

            var result = converter.Convert(5).FirstOrDefault();

            Assert.AreEqual("O", result);
        }
Beispiel #2
0
        public TimeConverter()
        {
            var hrLineConverter  = new OnOffPatternToLineConverter("RRRR", "OOOO");
            var lowMinConverter  = new OnOffPatternToLineConverter("YYYY", "OOOO");
            var highMinConverter = new OnOffPatternToLineConverter("YYRYYRYYRYY", "OOOOOOOOOOO");
            var splitter         = new Base5NumberSplitter();

            secConverter = new OnOffPatternOddnessConverter("Y", "O");
            hrConverter  = new NumberSplitToLinesConverter(splitter, hrLineConverter, hrLineConverter);
            minConverter = new NumberSplitToLinesConverter(splitter, highMinConverter, lowMinConverter);
        }
Beispiel #3
0
 public void ShouldThrowExIfPatternsLenghtDiffer()
 {
     var converter = new OnOffPatternOddnessConverter("YY", "O");
 }