Esempio n. 1
0
        public void TestDirectedEdgeToEdges()
        {
            var d1 = new DirectedEdge(new Node(new Coordinate(0, 0)),
                                      new Node(new Coordinate(10, 10)), new Coordinate(10, 10), true);
            var d2 = new DirectedEdge(new Node(new Coordinate(20, 0)),
                                      new Node(new Coordinate(20, 10)), new Coordinate(20, 10), false);
            var edges = DirectedEdge.ToEdges(new [] { d1, d2 });

            Assert.That(edges.Count, Is.EqualTo(2));
            Assert.That(edges[0], Is.Null);
            Assert.That(edges[1], Is.Null);
        }
Esempio n. 2
0
        public void testDirectedEdgeToEdges()
        {
            var d1 = new DirectedEdge(new Node(new Coordinate(0, 0)),
                                      new Node(new Coordinate(10, 10)), new Coordinate(10, 10), true);
            var d2 = new DirectedEdge(new Node(new Coordinate(20, 0)),
                                      new Node(new Coordinate(20, 10)), new Coordinate(20, 10), false);
            var edges = DirectedEdge.ToEdges(new List <DirectedEdge> (new [] { d1, d2 }));

            Assert.AreEqual(2, edges.Count);
            Assert.IsNull(edges[0]);
            Assert.IsNull(edges[1]);
        }