public void test_51_getReportResults_invalid_input() { String exception = ""; try { Dictionary <string, string> b = d.getName(-1); } catch (Exception e) { exception = e.ToString(); } Assert.IsTrue(exception.Contains("ArgumentOutOfRange")); }
//Detail Function public string ShowNameOfStudent() { Dictionary <string, string> d = student.getName(CurrentUser.getInstance().Studentnummer);//IMPORTANT, uses a test value, it needs the studentnumber when LDAP is finished. string s = ""; foreach (KeyValuePair <string, string> pair in d) { s = pair.Key + " " + pair.Value; } return(s); }