コード例 #1
0
        public void GetPersonlistTest()
        {
            List <PersonInfo> ResultList = new List <PersonInfo>();
            List <PersonInfo> Checklist  = PC.GetPersonlist();

            foreach (Person p in PersonList)
            {
                PersonInfo PI = new PersonInfo();
                PI.Person = p;
                PI.Status = PC.CheckFriendStatus(p.PersonId);
                ResultList.Add(PI);
            }

            foreach (PersonInfo PI in ResultList)
            {
                Boolean found = false;
                foreach (PersonInfo PI2 in Checklist)
                {
                    if (PI.Person.Email.Equals(PI2.Person.Email))
                    {
                        found = true;
                    }
                }
                Assert.True(found);
            }
            foreach (PersonInfo PI in Checklist)
            {
                Boolean found = false;
                foreach (PersonInfo PI2 in ResultList)
                {
                    if (PI.Person.Email.Equals(PI2.Person.Email))
                    {
                        found = true;
                    }
                }
                Assert.True(found);
            }
        }