示例#1
0
        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);
        }
示例#2
0
        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));
        }