예제 #1
0
        public void ReadOptVar_MissingReqdVar()
        {
            InputLine line = MakeInputLine("NotIntOrStrVar");

            Assert.IsFalse(line.ReadOptionalVar(strVar));
            TryReadVar(line, intVar);
        }
예제 #2
0
        public void ReadOptVar()
        {
            string    valueAsStr = "345";
            InputLine line       = MakeInputLine(intVar.Name + " " + valueAsStr);

            Assert.IsTrue(line.ReadOptionalVar(intVar));
            Assert.AreEqual(345, intVar.Value.Actual);
            Assert.AreEqual(valueAsStr, intVar.Value.String);
            AssertNoMoreLines(line);
        }