예제 #1
0
        public void Filter_AfterSortDescByDate_Test()
        {
            var args   = new string[] { "--sort", "date", "desc" };
            var result = FilterTestsOfStudent.Filter(_testArray, args);

            CollectionAssert.AreEqual(result, _expectedArrayAfterSortDescByDate);
        }
예제 #2
0
        public void Filter_AfterTestMathFlagFlag_Test()
        {
            var args   = new string[] { "--test", "Math" };
            var result = FilterTestsOfStudent.Filter(_testArray, args);

            CollectionAssert.AreEqual(result, _expectedArrayAfterTestMathFlag);
        }
예제 #3
0
        public void Filter_AfterSortAscByMark_Test()
        {
            var args   = new string[] { "--sort", "mark", "asc" };
            var result = FilterTestsOfStudent.Filter(_testArray, args);

            CollectionAssert.AreEqual(result, _expectedArrayAfterSortAscByMark);
        }
예제 #4
0
        public void Filter_AfterDateToFlag_Test()
        {
            var args   = new string[] { "--dateto", "01/01/2019" };
            var result = FilterTestsOfStudent.Filter(_testArray, args);

            CollectionAssert.AreEqual(result, _expectedArrayAfterDateToFlag);
        }
예제 #5
0
        public void Filter_AfterMaxMarkThreeFlag_Test()
        {
            var args   = new string[] { "--maxmark", "3" };
            var result = FilterTestsOfStudent.Filter(_testArray, args);

            CollectionAssert.AreEqual(result, _expectedArrayAfterMaxMarkThreeFlag);
        }
예제 #6
0
        public void Filter_AfterNameIvanFlag_Test()
        {
            var args   = new string[] { "--name", "Ivan" };
            var result = FilterTestsOfStudent.Filter(_testArray, args);

            CollectionAssert.AreEqual(result, _expectedArrayAfterNameIvanFlag);
        }
예제 #7
0
        public void Filter_ArgumentException_Test()
        {
            var args = new string[] { "--sort", "fffff", "sfsfsfs" };

            Assert.Throws <ArgumentException>(() => FilterTestsOfStudent.Filter(_testArray, args));
        }
예제 #8
0
        public void Filter_ArgumentNullException_Test()
        {
            var args = new string[] { "--minmark", "3" };

            Assert.Throws <ArgumentNullException>(() => FilterTestsOfStudent.Filter(null, args));
        }