public void StudentConstructorValidTest() { // arrange string fn = "Good"; string ln = "Morning"; string dp = "Everyone"; string gd = "2010"; string email = "*****@*****.**"; string mail = "335 8th Ave Calgary"; ContactStudent cs = new ContactStudent(email, mail); List <String> co = new List <string>() { "CPRG200", "CPRG210" }; // act Student s = new Student(fn, ln, dp, cs, gd, co); // assert Assert.IsNotNull(s); Assert.AreEqual(fn, s.FirstName); Assert.AreEqual(ln, s.LastName); Assert.AreEqual(dp, s.Department); Assert.AreEqual(cs, s.StudentCont); Assert.AreEqual(gd, s.GraduationYear); Assert.AreEqual(co, s.Course); }
public void ContactStudentConstractorBuildingNullTest() { // arrange string email = "*****@*****.**"; string mail = null; // act ContactStudent cs = new ContactStudent(email, mail); // assert Assert.Fail(); }
public void ContactStudentConstractorValidTest() { // arrange string email = "*****@*****.**"; string mail = "335 8th Ave Calgary"; // act ContactStudent cs = new ContactStudent(email, mail); // assert Assert.IsNotNull(cs); Assert.AreEqual(email, cs.Email); Assert.AreEqual(mail, cs.SnailMail); }