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)); }
public GuessMarker(IDataReader dataRead, IDataWriter dataWrite, IRandomSecret randomSecret) { this.secret = randomSecret.NextSecret(); this.dataRead = dataRead; this.dataWrite = dataWrite; }