public void Test_AStar_TakeShohamToSchool() { GraphExplorer gExplorer = null; IPath searchResult = null; IVertex start = null; IVertex destination = null; start = m_graph.Vertices["Hana 40"]; destination = m_graph.Vertices["Khoogim"]; gExplorer = new GraphExplorer(m_graph); searchResult = gExplorer.AStar(start, destination); Assert.AreEqual("Hana 29", searchResult.NextVertex(m_graph.Vertices["Hana 40"]).Name); }
public void Test_AStar_NoPath() { GraphExplorer gExplorer = null; IPath searchResult = null; IVertex start = null; IVertex destination = null; start = m_graph.Vertices["Shlomzion-Wizo"]; destination = m_graph.Vertices["Khoogim"]; gExplorer = new GraphExplorer(m_graph); searchResult = gExplorer.AStar(start, destination); Assert.IsNull(searchResult); }
public void Test_AStar_Boorekas() { GraphExplorer gExplorer = null; IPath searchResult = null; IVertex start = null; IVertex destination = null; start = m_graph.Vertices["Hana 40"]; destination = m_graph.Vertices["Z. Carmelia"]; gExplorer = new GraphExplorer(m_graph); searchResult = gExplorer.AStar(start, destination); Assert.AreEqual("Rachel 2", searchResult.NextVertex(m_graph.Vertices["Rachel Fork"]).Name); }
public void Test_AStar_StartIsTheGoal() { GraphExplorer gExplorer = null; IPath searchResult = null; IVertex start = null; IVertex destination = null; start = m_graph.Vertices["Hana 40"]; destination = m_graph.Vertices["Hana 40"]; gExplorer = new GraphExplorer(m_graph); searchResult = gExplorer.AStar(start, destination); Assert.AreEqual("Hana 40", searchResult.StartVertex.Name); Assert.IsNull(searchResult.NextVertex(start)); }