Esempio n. 1
0
 public void SaveStateBetweenDifferentInstances()
 {
     Interpreter interpreter = new Interpreter();
     interpreter.ProcessLine("save and load");
     string before = interpreter.LastLine;
     interpreter = new Interpreter();
     Assert.AreEqual(before, interpreter.LastLine);
 }
Esempio n. 2
0
        public void SaveStateBetweenDifferentInstances()
        {
            Interpreter interpreter = new Interpreter();

            interpreter.ProcessLine("save and load");
            string before = interpreter.LastLine;

            interpreter = new Interpreter();
            Assert.AreEqual(before, interpreter.LastLine);
        }
Esempio n. 3
0
 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);
 }
Esempio n. 4
0
        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);
        }