public void TestForEach() { int i=0; IRecord[] expected = { _record1, _record2, _record3 }; foreach (SearchHit hit in _result) { AssertEquals(expected[i++], hit.Record); } }