Exemple #1
0
 public void LinkInstruction_IncompleteInstructionFromString_ThrowsArgumentException()
 {
     ExceptionAssert.Throws <ArgumentException>(() => LinkInstruction.FromString(""));
     ExceptionAssert.Throws <ArgumentException>(() => LinkInstruction.FromString("Link:"));
     ExceptionAssert.Throws <ArgumentException>(() => LinkInstruction.FromString("(Obj1,1,1)"));
     ExceptionAssert.Throws <ArgumentException>(() => LinkInstruction.FromString("Link:(Obj1,1,1)"));
 }
Exemple #2
0
        public void LinkInstruction_CondensedInstructionFromString_IsCorrect()
        {
            var inst = LinkInstruction.FromString("Obj1,1,1-Obj1,1,2");

            Assert.AreEqual("Obj1", inst.Obj1.Obj);
            Assert.AreEqual(new XY(1, 1), inst.Obj1.Location);
            Assert.AreEqual("Obj1", inst.Obj2.Obj);
            Assert.AreEqual(new XY(1, 2), inst.Obj2.Location);
        }