public void SaveStateBetweenDifferentInstances() { Interpreter interpreter = new Interpreter(); interpreter.ProcessLine("save and load"); string before = interpreter.LastLine; interpreter = new Interpreter(); Assert.AreEqual(before, interpreter.LastLine); }
public void InterpretSimpleLine() { using (Ordered) { Expect.Once.On(timeSystem).GetProperty("Now").Will(Return.Value(DateTime.Parse("4:55"))); Expect.Once.On(timeSystem).GetProperty("Now").Will(Return.Value(DateTime.Parse("5:05"))); } Interpreter interpreter = new Interpreter(timeSystem); interpreter.ProcessLine("get up"); Assert.AreEqual("4:55:00\tget up\t0:10:00\t5:05:00", interpreter.LastLine); }