Ejemplo n.º 1
0
 public void TestStudentDogStatic2()
 {
     IStudentX s1 = new StudentX();
     IDogX d1 = new DogX();
     s1.Pets.Add(d1);
     Assert.AreEqual(d1.Owner, s1);
     Assert.IsTrue(s1.Pets.Contains(d1));
 }
Ejemplo n.º 2
0
 public void TestPersonDogStatic2()
 {
     IPersonX p1 = new PersonX();
     IDogX d1 = new DogX();
     p1.Pets.Add(d1);
     Assert.AreEqual(d1.Owner, p1);
     Assert.IsTrue(p1.Pets.Contains(d1));
 }
Ejemplo n.º 3
0
 public void TestStudentDogStatic4()
 {
     IStudentX s1 = new StudentX();
     IDogX d1 = new DogX();
     s1.Dogs.Add(d1);
     Assert.AreEqual(d1.Friend, s1);
     Assert.IsTrue(s1.Dogs.Contains(d1));
 }