public void testUniquePathFilter() { var _Graph = TinkerGraphFactory.CreateTinkerGraph(); var _Pipe1 = new OutEdgesPipe <UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object>(); var _Pipe2 = new InVertexPipe <UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object>(); var _Pipe3 = new InEdgesPipe <UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object>(); var _Pipe4 = new OutVertexPipe<UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object>(); var _Pipe5 = new UniquePathFilterPipe<IGenericPropertyVertex<UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object>>(); var _Pipeline = new Pipeline<IGenericPropertyVertex<UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object>, IGenericPropertyVertex<UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object>>(_Pipe1, _Pipe2, _Pipe3, _Pipe4, _Pipe5); _Pipeline.SetSource(new SingleEnumerator<IGenericPropertyVertex<UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object>>(_Graph.VertexById(1))); var _Counter = 0; foreach (var _Object in _Pipeline) { _Counter++; Assert.IsTrue(_Object.Equals(_Graph.VertexById(6)) || _Object.Equals(_Graph.VertexById(4))); } Assert.AreEqual(2, _Counter); }
public void testInEdges() { var _Graph = TinkerGraphFactory.CreateTinkerGraph(); var _Josh = _Graph.VertexById(4); var _Pipe = new InEdgesPipe<UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object>(); _Pipe.SetSource(new SingleEnumerator<IGenericPropertyVertex<UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object, UInt64, Int64, String, String, Object>>(_Josh)); var _Counter = 0; while (_Pipe.MoveNext()) { _Counter++; var edge = _Pipe.Current; Assert.AreEqual(8, edge.Id); } Assert.AreEqual(1, _Counter); }