Example #1
0
 public String Print(Counter counter,Word actualWord)
 {
     _counter = counter;
     if (IsTimOrPex())
         return _simpleWordPrinter.Print(actualWord, _resultWord);
     return _wordAndCountPrinter.Print(_counter, actualWord);
 }
Example #2
0
 public Timpex(TimpexPredicate timpexPredicate, CounterPrinter counterPrinter, TimpexPrinter timpexPrinter, Counter counter)
 {
     _timpexPredicate = timpexPredicate;
     _counterPrinter = counterPrinter;
     _timpexPrinter = timpexPrinter;
     _counter = counter;
 }
Example #3
0
 public virtual string Print(Counter counter)
 {
     _counter = counter;
     if (TryPrintTimPex() || TryPrintTim())
         return _result;
     return _pexPrinter.Print();
 }
Example #4
0
 public virtual Word HandleWordBasedOnCounter(Counter counter)
 {
     _counter = counter;
        if (TryHandleTimPex() || TryHandleTim())
        return _resultWord;
        return _pexWordFactory.Create();
 }
Example #5
0
 public virtual bool Matches(Counter counter)
 {
     return counter.Count%3 == 0;
 }
 public virtual string Concatinate(Counter counter, Word word)
 {
     var convertedValue = _textConverter.Convert(counter);
     var wordValue = word.Value();
     return wordValue + " " + convertedValue;
 }
Example #7
0
 public virtual string Print(Counter counter)
 {
     var value = _textConverter.Convert(counter);
     return value;
 }
Example #8
0
 public virtual string Print(Counter counter, Word word)
 {
     return _counterAndWordConcatenating.Concatinate(counter,word);
 }
Example #9
0
 public virtual bool Matches(Counter counter)
 {
     return _timPredicate.Matches(counter) || _pexPredicate.Matches(counter);
 }