public void addNodeListTest() { try { Map map = new Map(); Node n1 = new PointOfInterest(1, 0, 0, 1); Node n2 = new PointOfInterest(2, 0, 0, 1); List<Node> nodeList = new List<Node>(); nodeList.Add(n1); nodeList.Add(n2); map.setPoiList(nodeList); List<Node> mapNodes = map.GetPoiNodes(); Assert.IsNotNull(nodeList); Assert.IsNotNull(mapNodes); Assert.Equals(nodeList, mapNodes); } catch (SecurityException e) { Console.WriteLine("Security Exception:\n\n{0}", e.Message); } }
public void initializeGraphTest() { try { Map map = new Map(); Node n1 = new PointOfInterest(1, 0, 0, 1); Node n2 = new PointOfInterest(2, 0, 0, 1); List<Node> nodeList = new List<Node>(); nodeList.Add(n1); nodeList.Add(n2); map.setPoiList(nodeList); Graph g = new Graph(); g.InsertNewVertex(n1); g.InsertNewVertex(n2); map.initializeGraph(nodeList); Graph mapGraph = map.getGraph(); Assert.IsNotNull(nodeList); Assert.IsNotNull(g); Assert.IsNotNull(mapGraph); Assert.Equals(g, mapGraph); } catch (SecurityException e) { Console.WriteLine("Security Exception:\n\n{0}", e.Message); } }