/// <summary> /// get exam count according to condition /// </summary> /// <param name="username">username</param> /// <param name="keyword">all or finished or unfinished</param> /// <returns>count</returns> public int GetExamCount(string username, string keyword) { ExamManager examManager = new ExamManager(); return(examManager.GetExamCount(username, keyword)); }
public void TestGetExamCount() { Assert.AreEqual(1, examManager.GetExamCount("test", "all")); Assert.AreEqual(1, examManager.GetExamCount("test", "unfinished")); Assert.AreEqual(0, examManager.GetExamCount("test", "finished")); }