public void FilterExceptionTest(string criteria, Type expectedEx) { var dataRetriever = new DataRetriever(Environment.CurrentDirectory + @"\StudentDataForTest.json"); void Result() => dataRetriever.Filter(criteria).ToList(); Assert.Throws(expectedEx, Result); }
public void FilterTest(string criteria, List <StudentAndTest> expectedResult) { var dataRetriever = new DataRetriever(Environment.CurrentDirectory + @"\StudentDataForTest.json"); var result = dataRetriever.Filter(criteria).ToList(); Assert.That(result, Is.EqualTo(expectedResult)); }