示例#1
0
        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());
        }
示例#2
0
        public void TestGetXYZ()
        {
            NamedPoint p1 = new NamedPoint("p1", 10, 20);

            Assert.AreEqual("p1", p1.GetName());
            Assert.AreEqual(10, p1.GetX());
            Assert.AreEqual(20, p1.GetY());
        }