public void TestFromString_ExtraSpace() { NamedPoint c = NamedPoint.Parse(" random , 10 , 20 "); Assert.AreEqual("random", c.GetName()); Assert.AreEqual(10, c.GetX()); Assert.AreEqual(20, c.GetY()); }
private void ProcessLine(string line) { try { db.AddItem(NamedPoint.Parse(line)); } catch (Exception ex) { Console.Error.WriteLine("Error: {0}", ex); } }
public void TestFromString_BadRecord() { NamedPoint c = NamedPoint.Parse("// this is not a valid record"); }