Beispiel #1
0
        public void ObjectToString()
        {
            var edge1 = new TaggedEdge <int, TestObject>(1, 2, null);
            var edge2 = new TaggedEdge <int, TestObject>(1, 2, new TestObject(42));
            var edge3 = new TaggedEdge <int, TestObject>(2, 1, null);

            Assert.AreEqual("1 -> 2 (no tag)", edge1.ToString());
            Assert.AreEqual("1 -> 2 (42)", edge2.ToString());
            Assert.AreEqual("2 -> 1 (no tag)", edge3.ToString());
        }
Beispiel #2
0
 /// <summary>
 /// Returns formatted string for this connector object
 /// </summary>
 /// <returns></returns>
 public override string ToString()
 {
     return(TaggedEdge.ToString());
 }