Esempio n. 1
0
 public void TestToString()
 {
     Employee employee = new Employee("John", "Kennedy");
     Assert.AreEqual(employee.ToString(), "Employee{John,Kennedy}");
 }
Esempio n. 2
0
 public void TestHashCode()
 {
     Employee employee = new Employee("John", "Kennedy");
     Employee employee2 = new Employee("John", "Kennedy");
     Assert.AreEqual(employee.GetHashCode(), employee2.GetHashCode());
 }
Esempio n. 3
0
 public void TestGetLastName()
 {
     Employee employee = new Employee("Roger", "Rabbit");
     Assert.AreEqual("Rabbit", employee.GetLastName(), "Last name not correct");
 }
Esempio n. 4
0
 public void TestFullName()
 {
     Employee employee = new Employee("Abe", "Lincoln");
     Assert.AreEqual(employee.GetFullName(), "Abe Lincoln");
 }
Esempio n. 5
0
 public void TestEqualityDesctructive()
 {
     Employee employee = new Employee("James", "Kirk");
     Employee employee2 = new Employee("Jean", "Picard");
     Assert.AreNotEqual(employee, employee2);
 }
Esempio n. 6
0
 public void TestEquality()
 {
     Employee employee = new Employee("John", "Kennedy");
     Employee employee2 = new Employee("John", "Kennedy");
     Assert.AreEqual(employee, employee2);
 }