public void TestScenario_01_WorkedExample_2_0() { /* * 1: A(2,3) [Point] => Point * 2: B(3,4) [Point] => Point * 3: AB [Label] => [Line, LineSegment] */ var graph = new RelationGraph(); var ptA = new Point("A", 2, 3); var ptASymbol = new PointSymbol(ptA); var ptB = new Point("B", 3, 4); var ptBSymbol = new PointSymbol(ptB); graph.AddNode(ptASymbol); graph.AddNode(ptBSymbol); const string label = "AB"; var query = new Query(label); var qn = graph.AddNode(query); Assert.Null(qn); Assert.False(query.Success); Assert.NotNull(query.FeedBack); var types = query.FeedBack as List <ShapeType>; Assert.NotNull(types); Assert.True(types.Count == 2); var shapes = graph.RetrieveShapes(); Assert.True(shapes.Count == 2); }
public void TestScenario_01_WorkedExample_2_0() { /* * 1: A(2,3) [Point] => Point * 2: B(3,4) [Point] => Point * 3: AB [Label] => [Line, LineSegment] */ var graph = new RelationGraph(); var ptA = new Point("A", 2, 3); var ptASymbol = new PointSymbol(ptA); var ptB = new Point("B", 3, 4); var ptBSymbol = new PointSymbol(ptB); graph.AddNode(ptASymbol); graph.AddNode(ptBSymbol); const string label = "AB"; var query = new Query(label); var qn = graph.AddNode(query); Assert.Null(qn); Assert.False(query.Success); Assert.NotNull(query.FeedBack); var types = query.FeedBack as List<ShapeType>; Assert.NotNull(types); Assert.True(types.Count == 2); var shapes = graph.RetrieveShapes(); Assert.True(shapes.Count == 2); }