public void MulitpleClubs()
        {
            var p1 = new Person("test", "test", USA);
            var p2 = new Person("test", "test", USA);
            var club1 = new Club();
            var club2 = new Club();
            p1.Join(club1);
            p1.Join(club2);
            club1.AddMember(p2);
            club2.AddMember(p2);

            assertIsConsistent(p1, club1);
            assertIsConsistent(p1, club2);
            assertIsConsistent(p2, club1);
            assertIsConsistent(p1, club2);
        }
        public void JoinClub()
        {
            var p = new Person("test", "test", USA);
            var theClub = new Club();
            p.Join(theClub);

            assertIsConsistent(p, theClub);
        }
Esempio n. 3
0
        public void MulitpleClubs()
        {
            var p1    = new Person("test", "test", USA);
            var p2    = new Person("test", "test", USA);
            var club1 = new Club();
            var club2 = new Club();

            p1.Join(club1);
            p1.Join(club2);
            club1.AddMember(p2);
            club2.AddMember(p2);

            assertIsConsistent(p1, club1);
            assertIsConsistent(p1, club2);
            assertIsConsistent(p2, club1);
            assertIsConsistent(p1, club2);
        }
Esempio n. 4
0
File: Club.cs Progetto: yuuhhe/db4o
 public void AddMember(Person person)
 {
     if (!members.Contains(person))
     {
         members.Add(person);
         person.Join(this);
     }
 }
Esempio n. 5
0
        public void JoinClub()
        {
            var p       = new Person("test", "test", USA);
            var theClub = new Club();

            p.Join(theClub);

            assertIsConsistent(p, theClub);
        }