Example #1
0
        public PersonGenderList GetPersonGenders(IUserContext userContext)
        {
            IPersonGender    gender           = new PersonGender(1, "gender", 1, new DataContext(userContext));
            PersonGenderList personGenderList = new PersonGenderList();

            personGenderList.Add(gender);
            IPersonGender gender2 = new PersonGender(3, "gender2", 3, new DataContext(userContext));

            personGenderList.Add(gender2);
            return(personGenderList);
        }
Example #2
0
        public void SquareBracketOperator()
        {
            PersonGenderList newPersonGenderList, oldPersonGenderList;
            Int32            personGenderIndex;

            oldPersonGenderList = GetPersonGenders(true);
            newPersonGenderList = new PersonGenderList();
            for (personGenderIndex = 0; personGenderIndex < oldPersonGenderList.Count; personGenderIndex++)
            {
                newPersonGenderList.Add(oldPersonGenderList[oldPersonGenderList.Count - personGenderIndex - 1]);
            }
            for (personGenderIndex = 0; personGenderIndex < oldPersonGenderList.Count; personGenderIndex++)
            {
                Assert.AreEqual(newPersonGenderList[personGenderIndex], oldPersonGenderList[oldPersonGenderList.Count - personGenderIndex - 1]);
            }
        }