コード例 #1
0
 public void SetUp()
 {
     _digitWriter    = new DigitWriter(BritishNumbersDictionary.DigitDictionary());
     _tensWriter     = new TensWriter(BritishNumbersDictionary.TensDictionary(), _digitWriter);
     _hundredsWriter = new HundredsWriter(_tensWriter);
     _unitWriter     = new UnitWriter(BritishNumbersDictionary.UnitsDictionary(), _hundredsWriter);
 }
コード例 #2
0
        public void Write_900_NineHundred(int numberToWrite, string expectedWrittenNumber)
        {
            var digitWriter    = new DigitWriter(BritishNumbersDictionary.DigitDictionary());
            var tensWriter     = new TensWriter(BritishNumbersDictionary.TensDictionary(), digitWriter);
            var hundredsWriter = new HundredsWriter(tensWriter);

            var nineHundred = hundredsWriter.Write(numberToWrite);

            Assert.AreEqual(expectedWrittenNumber, nineHundred);
        }
 public INumberWriter CreateSingleDigitWriter()
 {
     return(new DigitWriter(BritishNumbersDictionary.DigitDictionary()));
 }
コード例 #4
0
 public void SetUp()
 {
     _digitHandler = new DigitWriter(BritishNumbersDictionary.DigitDictionary());
 }