Exemple #1
0
        public void GetUserIdByUserDetail()
        {
            var user = CreateUser();
            var userDataId = 0L;
            //Create New user
            var userId1 = mUserRepository.PersistUser(user, out errorMessages);
            Assert.AreNotEqual(0, userId1);

            var primaryTaxPayer = IT_PersonalInfo.CreateAndPersistPrimaryTaxPayer(userId1, FilingStatus.Single, ref userDataId);

            // Get User ID by User Detail
            var userId2 = mUserRepository.GetUserIdByUserDetails(primaryTaxPayer.Person);
            Assert.AreEqual(userId2, userId1);

        }
Exemple #2
0
        public void GetUserNameAndIdByUserDetails()
        {
            var user = CreateUser();
            var userDataId = 0L;
            //Create New user
            var userId1 = mUserRepository.PersistUser(user, out errorMessages);
            Assert.AreNotEqual(0, userId1);

            var primaryTaxPayer = IT_PersonalInfo.CreateAndPersistPrimaryTaxPayer(userId1, FilingStatus.Single, ref userDataId);
            dynamic userDetail = new ExpandoObject();
            userDetail.FirstName = primaryTaxPayer.Person.FirstName;
            userDetail.LastName = primaryTaxPayer.Person.LastName;
            userDetail.DateOfBirth = primaryTaxPayer.Person.DateOfBirth;
            userDetail.Email = user.Email;

            // Get User ID by User Detail
            var userId2 = mUserRepository.GetUserNameAndIdByUserDetails(userDetail);
            Assert.AreEqual(userId2, userId1);
        }