Esempio n. 1
0
        public void TestMarkingGuess(string result, string guess, string secret)
        {
            Expect.Call(dataReader.getInputData()).Return(guess);
            Expect.Call(randomSecret.NextSecret()).Return(secret);
            mock.ReplayAll();

            GuessMarker guessMarker = new GuessMarker(dataReader, dataWriter, randomSecret);

            guessMarker.Step();

            dataWriter.AssertWasCalled(x => x.WriteData(result));
        }
Esempio n. 2
0
 public GuessMarker(IDataReader dataRead, IDataWriter dataWrite, IRandomSecret randomSecret)
 {
     this.secret = randomSecret.NextSecret();
     this.dataRead = dataRead;
     this.dataWrite = dataWrite;
 }
Esempio n. 3
0
 public GuessMarker(IDataReader dataRead, IDataWriter dataWrite, IRandomSecret randomSecret)
 {
     this.secret    = randomSecret.NextSecret();
     this.dataRead  = dataRead;
     this.dataWrite = dataWrite;
 }