Ejemplo n.º 1
0
 public String Print()
 {
     _numberCounter.IncrementNumber();
     if (_counterPredicate.IsDividableWithFive(_numberCounter) && _counterPredicate.IsDividableWithThree(_numberCounter))
     {
         return(_timpexPrinter.Print());
     }
     if (_counterPredicate.IsDividableWithFive(_numberCounter))
     {
         return(_pexPrinter.Print());
     }
     if (_counterPredicate.IsDividableWithThree(_numberCounter))
     {
         return(_timPrinter.Print());
     }
     return(_numberCounter.GetValue().ToString());
 }
Ejemplo n.º 2
0
        public void It_Should_Return_True_When_Diviable_with_Three()
        {
            _sut = new CounterPredicate();
            _counter.Stub(x => x.GetValue()).Return(3);
            Boolean _result = _sut.IsDividableWithThree(_counter);

            Assert.AreEqual(true, _result);
        }
Ejemplo n.º 3
0
        public void It_Should_return_true_when_dividing_with_five()
        {
            Boolean result = _sut.IsDividableWithThree(_counter);

            Assert.AreEqual(_dividableWithThree, result);
        }