public void ReadOptVar_MissingReqdVar() { InputLine line = MakeInputLine("NotIntOrStrVar"); Assert.IsFalse(line.ReadOptionalVar(strVar)); TryReadVar(line, intVar); }
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); }