public void testBasicFutureFilter() { var _Names = new List<String>() { "marko", "povel", "peter", "josh" }; var _Pipe1 = new FutureFilterPipe<String>(new IdentityPipe<String>()); _Pipe1.SetSourceCollection(_Names); var _Counter = 0; while (_Pipe1.MoveNext()) { _Counter++; } Assert.AreEqual(4, _Counter); }
public void testAdvancedFutureFilter() { var _Names = new List<String>() { "marko", "povel", "peter", "josh" }; var _Pipe = new FutureFilterPipe<String>(new CollectionFilterPipe<String>(new List<String>() { "marko", "povel" }, ComparisonFilter.EQUAL)); _Pipe.SetSourceCollection(_Names); var _Counter = 0; while (_Pipe.MoveNext()) { _Counter++; var _Name = _Pipe.Current; Assert.IsTrue(_Name.Equals("peter") || _Name.Equals("josh")); } Assert.AreEqual(2, _Counter); }