Exemplo n.º 1
0
 public void TestPersonDogStatic2()
 {
     Person p1 = new Person();
     Dog d1 = new Dog();
     p1.Pets.Add(d1);
     Assert.AreEqual(p1, d1.Owner);
     Assert.IsTrue(p1.Pets.Contains(d1));
 }
Exemplo n.º 2
0
 public void TestStudentDogStatic2()
 {
     Student s1 = new Student();
     Dog d1 = new Dog();
     s1.Pets.Add(d1);
     Assert.AreEqual(d1.Owner, s1);
     Assert.IsTrue(s1.Pets.Contains(d1));
 }
Exemplo n.º 3
0
 public void TestPersonDogStatic1()
 {
     Person p1 = new Person();
     Dog d1 = new Dog();
     d1.Owner = p1;
     Assert.AreEqual(d1.Owner, p1);
     Assert.IsTrue(p1.Pets.Contains(d1));
 }
Exemplo n.º 4
0
 public void TestStudentDogStatic4()
 {
     Student s1 = new Student();
     Dog d1 = new Dog();
     s1.Dogs.Add(d1);
     Assert.AreEqual(d1.Friend, s1);
     Assert.IsTrue(s1.Dogs.Contains(d1));
 }