示例#1
0
 public void SetUp()
 {
     nodeList = new MasterNodeList<string>();
     vn = nodeList.newValueNodeFromValue("A");
     vn2 = nodeList.newValueNodeFromValue("B");
     vn3 = nodeList.newValueNodeFromValue("C");
     edge = new Edge() {
         link = new DirectedPair()
         {
             from = vn,
             to = vn2
         }
     };
     edge2 = new Edge()
     {
         link = new DirectedPair()
         {
             from = vn3,
             to = vn
         }
     };
     routeFactory = new RouteFactory<string>();
     routeFactory.newRouteFromEdge(edge);
 }
示例#2
0
        public void SetUp()
        {
            list = new MasterNodeList<string>();
            nodeA = list.newValueNodeFromValue("A");
            nodeB = list.newValueNodeFromValue("B");
            nodeC = list.newValueNodeFromValue("C");
            nodeD = list.newValueNodeFromValue("D");
            nodeD2 = list.newValueNodeFromValue("D");
            nodeD3 = list.newValueNodeFromValue("D");

            routeFactory = new RouteFactory<string>();

            edgeAB = new Edge()
            {
                link = new DirectedPair()
                {
                    from = nodeA,
                    to = nodeB
                }
            };
            edgeBC = new Edge()
            {
                link = new DirectedPair()
                {
                    from = nodeB,
                    to = nodeC
                }
            };
            edgeCD = new Edge()
            {
                link = new DirectedPair()
                {
                    from = nodeC,
                    to = nodeD
                },
                requisiteLink = new DirectedPair()
                {
                    from = nodeA,
                    to = nodeB
                }
            };
            edgeBD = new Edge()
            {
                link = new DirectedPair()
                {
                    from = nodeB,
                    to = nodeD
                },
                requisiteLink = new DirectedPair()
                {
                    from = nodeA,
                    to = nodeB
                }
            };
            edgeBD2 = new Edge()
            {
                link = new DirectedPair()
                {
                    from = nodeB,
                    to = nodeD2
                },
                requisiteLink = new DirectedPair()
                {
                    from = nodeC,
                    to = nodeB
                }
            };

            edgeCB = new Edge()
            {
                link = new DirectedPair()
                {
                    from = nodeC,
                    to = nodeB
                }
            };
            routeCB = routeFactory.newRouteFromEdge(edgeCB);
            routeAB = routeFactory.newRouteFromEdge(edgeAB);
            routeBC = routeFactory.newRouteFromEdge(edgeBC);
            routeCD = routeFactory.newRouteFromEdge(edgeCD);

            routeBD = routeFactory.newRouteFromEdge(edgeBD);
            routeBD2 = routeFactory.newRouteFromEdge(edgeBD2);

            routeABC = routeFactory.newRouteFromConnectedRoutes(routeAB, routeBC);

            routeABCD = routeFactory.newRouteFromConnectedRoutes(routeABC, routeCD);
        }