public void UpdateNewStateInfo()
        {
            var primaryTaxPayer     = IT_PersonalInfo.CreatePrimaryTaxPayer(FilingStatus.Single);
            var expectedUserDataID  = mPersonalInfoRepository.PersistPrimaryTaxPayer(primaryTaxPayer, mUserId, mUserDataId);
            var expectedForm1099OID = CreateForm1099OID(OwnerType.PrimaryTaxPayer);

            foreach (var item in expectedForm1099OID.Form1099StateInfo)
            {
                item.StateIdentificationNumber = "1";
            }
            var firstForm1099OIDJson = JsonConvert.SerializeObject(expectedForm1099OID);

            mTaxReturnData.UserDataId = expectedUserDataID.Item1;
            mTaxReturnData.TaxData    = firstForm1099OIDJson;
            mUserData.userId          = mUserId;
            mUserData.TaxReturnData   = JsonConvert.SerializeObject(mTaxReturnData);


            //Persist first Form 1099OID
            var    actualForm1099UserDataID = mInterestIncomeRepository.PersistTaxReturnForm1099OIDData(mUserData);
            string taxObject = mTaxReturnRepository.GetTaxReturnDatabyUserDataId(actualForm1099UserDataID.UserDataId, mUserId);

            var actualForm1099OIDList = JsonConvert.DeserializeObject <BusinessObject.Tax1040>(taxObject).Income.Form1099OID;

            foreach (var state in actualForm1099OIDList.SelectMany(stateInfo => stateInfo.Form1099StateInfo))
            {
                Assert.AreEqual("1", state.StateIdentificationNumber);
            }
        }
Example #2
0
        public void RequiredForCardType()
        {
            //Required #10

            bool HasErrorCode    = false;
            var  primaryTaxPayer = IT_PersonalInfo.CreatePrimaryTaxPayer(FilingStatus.MarriedFilingJointly);

            var userDataID = mPersonalInfoRepository.PersistPrimaryTaxPayer(primaryTaxPayer, mUserId, userDataId);

            var CardDetail = CardDetails(CardType.None);

            // paymentDTO.Order=JsonConvert.DeserializeObject(CardDetail);

            //  var result = mPaymentRepository.PersistIRSPaymentOption(paymentDTO);


            // var primaryTaxPayer = CreateUser(FilingStatus.Single);
            // var userData = IT_PersonalInfo.CreatePrimaryTaxPayer(FilingStatus.Single);
            // var expectedUserDataID = mPersonalInfoRepository.PersistPrimaryTaxPayer(primaryTaxPayer, mUserId, userDataId);
            // paymentDTO.UserDataId=
            //var userDataID = mPaymentRepository.PersistIRSPaymentOption(
            //var result = mPersonalInfoRepository.GetPersonalDetailsByUserIdAndUserDataId(mUserId, userDataID);
            //List<ErrorMessage> lsterrormsg = (result.Item2) as List<ErrorMessage>;
            // HasErrorCode = lsterrormsg.Any(em => (em.ErrorCode == "Address_RF15"));
            // Assert.IsTrue(HasErrorCode);
        }
        public void WhoseUnEmploymentCompensationNotSelected()
        {
            var hasEligibilityDiagnostics = false;
            var UserDateId = 0L;

            //Prepare Form 1099G
            mTaxReturnData.TaxData = JsonConvert.SerializeObject(CreateForm1099GForRFValidations());
            var filingStatus    = FilingStatus.MarriedFilingJointly;
            var primaryTaxpayer = IT_PersonalInfo.CreatePrimaryTaxPayer(filingStatus);

            //Persist Primary Taxpayer
            var userDateId = mPersonalInfoRepository.PersistPrimaryTaxPayer(primaryTaxpayer, mUserId, UserDateId, null);

            mTaxReturnData.UserDataId = userDateId.Item1;

            //Persist Form 1099G
            var form1099GId = mUnemploymentRepository.CreateAndPersistUnemployment(mUserId, mTaxReturnData);

            //Get Form 1099G
            mUserInputData.userDataId         = form1099GId.UserDataId;
            mUserInputData.currentForm1099GId = form1099GId.Form1099GId;

            //Get Form 1099G with all validations
            BusinessObject.Tax1040 taxObject = Utilities.GetTaxObjectByUserIdAndUserDataId(mUserInputData.userId, mUserInputData.userDataId);
            Assert.IsTrue(taxObject.ErrorMessages.Count > 0);
            hasEligibilityDiagnostics = taxObject.ErrorMessages.Any(em => (em.ErrorCode == "UnemploymentCompensation_RF1"));
            Assert.IsTrue(hasEligibilityDiagnostics);
        }
Example #4
0
        public void GetCreditSummary()
        {
            //Persist Personal Info
            var primaryTaxPayer         = IT_PersonalInfo.CreatePrimaryTaxPayer(FilingStatus.Single);
            var expectedPrimaryTaxpayer = mPersonalInfoRepository.PersistPrimaryTaxPayer(primaryTaxPayer, mUserId, mUserDataId);

            //Persist W2
            var expectedWages = IT_W2Repository.CreateW2(EmploymentType.RegularW2Wages, OwnerType.PrimaryTaxPayer);

            expectedWages.WagesAmount = 10000.00;
            mTaxReturnData.TaxData    = JsonConvert.SerializeObject(expectedWages);
            mTaxReturnData.UserDataId = expectedPrimaryTaxpayer.Item1;
            var expectedWagesData = mW2Repository.PersistW2TaxReturnData(mUserId, mTaxReturnData);

            //Persist EIC
            var expectedEic = CreateEIC();

            expectedEic.HasValidSSN            = true;
            expectedEic.IsInUSMorethanHalfYear = true;
            mTaxReturnData.TaxData             = JsonConvert.SerializeObject(expectedEic);
            mTaxReturnData.UserDataId          = expectedWagesData.UserDataId;
            var expectedEicUserDataId = mEarnedIncomeCreditRepository.PersitEarnedIncomeCredit(mUserId, mTaxReturnData, mYear);

            //Get EIC
            mUserDTO.UserDataId = expectedEicUserDataId;
            mUserDTO.UserId     = mUserId;
            var actualeic = mEarnedIncomeCreditRepository.GetCreditSummary(mUserDTO);

            Assert.IsTrue(actualeic.EICEligibility);
        }
        public void DeleteForm1099OID()
        {
            var givenPrimaryTaxPayer = IT_PersonalInfo.CreatePrimaryTaxPayer(FilingStatus.Single);
            var userData             = mPersonalInfoRepository.PersistPrimaryTaxPayer(givenPrimaryTaxPayer, mUserId, mUserDataId);

            var expectedSpouseForm1099OID = CreateForm1099OID(OwnerType.Spouse);

            mTaxReturnData.UserDataId = userData.Item1;
            mTaxReturnData.TaxData    = JsonConvert.SerializeObject(expectedSpouseForm1099OID);;
            mUserData.userId          = mUserId;
            mUserData.TaxReturnData   = JsonConvert.SerializeObject(mTaxReturnData);

            //Persist Spouse Form 1099INT
            var exepectedSpouseUserData = mInterestIncomeRepository.PersistTaxReturnForm1099OIDData(mUserData);

            //Delete second Form 1099INT
            var userDTO = new UserDTO
            {
                UserId     = mUserId,
                UserDataId = exepectedSpouseUserData.UserDataId,
                FormId     = exepectedSpouseUserData.Form1099OIDId
            };

            //Delete and Persist 1099OID object
            mInterestIncomeRepository.DeleteAndPersist1099OID(userDTO);

            mUserData.currentForm1099OIDId = exepectedSpouseUserData.Form1099OIDId;
            var actualDeletedForm1099OID = GetForm1099OID(userDTO);

            Assert.AreEqual(actualDeletedForm1099OID, null);
        }
        public void PersistForm1099OIDWitoutStateInformation()
        {
            var primaryTaxPayer     = IT_PersonalInfo.CreatePrimaryTaxPayer(FilingStatus.Single);
            var expectedUserDataID  = mPersonalInfoRepository.PersistPrimaryTaxPayer(primaryTaxPayer, mUserId, mUserDataId);
            var expectedForm1099OID = CreateForm1099OID(OwnerType.PrimaryTaxPayer);

            expectedForm1099OID.Form1099StateInfo = null;
            var firstForm1099OIDJson = JsonConvert.SerializeObject(expectedForm1099OID);

            mTaxReturnData.UserDataId = expectedUserDataID.Item1;
            mTaxReturnData.TaxData    = firstForm1099OIDJson;
            mUserData.userId          = mUserId;
            mUserData.TaxReturnData   = JsonConvert.SerializeObject(mTaxReturnData);


            //Persist first Form 1099OID
            var    actualForm1099UserDataID = mInterestIncomeRepository.PersistTaxReturnForm1099OIDData(mUserData);
            string taxObject = mTaxReturnRepository.GetTaxReturnDatabyUserDataId(actualForm1099UserDataID.UserDataId, mUserId);

            var actualForm1099OIDList = JsonConvert.DeserializeObject <BusinessObject.Tax1040>(taxObject).Income.Form1099OID;

            foreach (var actualForm1099OID in actualForm1099OIDList)
            {
                Assert.AreEqual(expectedForm1099OID.Form1099StateInfo, actualForm1099OID.Form1099StateInfo);
            }
        }
        public void UpdateForm1099OIDData()
        {
            var givenPrimaryTaxPayer = IT_PersonalInfo.CreatePrimaryTaxPayer(FilingStatus.Single);
            var userData             = mPersonalInfoRepository.PersistPrimaryTaxPayer(givenPrimaryTaxPayer, mUserId, mUserDataId);
            var expectedPrimayTaxPayerForm1099OID = CreateForm1099OID(OwnerType.PrimaryTaxPayer);

            //Serializing PrimaryTax payer Object
            mTaxReturnData.UserDataId = userData.Item1;
            mTaxReturnData.TaxData    = JsonConvert.SerializeObject(expectedPrimayTaxPayerForm1099OID);
            mUserData.userId          = mUserId;
            mUserData.TaxReturnData   = JsonConvert.SerializeObject(mTaxReturnData);

            //Persist Primary Tax Payer Form 1099OID
            var exepectedPrimaryTaxPayerUserData = mInterestIncomeRepository.PersistTaxReturnForm1099OIDData(mUserData);


            var expectedSpouseForm1099OID       = CreateForm1099OID(OwnerType.Spouse);
            var convertingSecondform1099OIDJson = JsonConvert.SerializeObject(expectedSpouseForm1099OID);

            mTaxReturnData.UserDataId = exepectedPrimaryTaxPayerUserData.UserDataId;
            mTaxReturnData.TaxData    = convertingSecondform1099OIDJson;
            mUserData.userId          = mUserId;
            mUserData.TaxReturnData   = JsonConvert.SerializeObject(mTaxReturnData);

            //Persist Spouse Form 1099INT
            var exepectedSpouseUserData = mInterestIncomeRepository.PersistTaxReturnForm1099OIDData(mUserData);


            string taxObject = mTaxReturnRepository.GetTaxReturnDatabyUserDataId(exepectedSpouseUserData.UserDataId, mUserId);
            var    expectedSpouseForm1099OIDList = JsonConvert.DeserializeObject <BusinessObject.Tax1040>(taxObject).Income.Form1099OID;


            // Get Spouse Form 1099INT for Update
            var expectedSpouseForm1099OIDForUpdate = expectedSpouseForm1099OIDList.FirstOrDefault(fInt => fInt.Form1099OIDId == exepectedSpouseUserData.Form1099OIDId);

            expectedSpouseForm1099OIDForUpdate.Owner = OwnerType.Joint;
            expectedSpouseForm1099OIDForUpdate.TaxableInterestAmount       = 0;
            expectedSpouseForm1099OIDForUpdate.FederalTaxWithHoldingAmount = 0;

            mTaxReturnData.UserDataId = exepectedSpouseUserData.UserDataId;
            mTaxReturnData.TaxData    = JsonConvert.SerializeObject(expectedSpouseForm1099OIDForUpdate);
            mUserData.userId          = mUserId;
            mUserData.TaxReturnData   = JsonConvert.SerializeObject(mTaxReturnData);

            #region Update Form1099OID
            //Persist Spouse 1099OID Form with Updated values
            var actualSpouse1099OIDData = mInterestIncomeRepository.PersistTaxReturnForm1099OIDData(mUserData);
            #endregion

            #region Validating Form1099 with Updated values
            taxObject = mTaxReturnRepository.GetTaxReturnDatabyUserDataId(exepectedSpouseUserData.UserDataId, mUserId);
            var actualForm1099OIDList = JsonConvert.DeserializeObject <BusinessObject.Tax1040>(taxObject).Income.Form1099OID;

            // Get modified second Form 1099OID
            var actualSpouseForm1099 = actualForm1099OIDList.FirstOrDefault(fInt => fInt.Form1099OIDId == actualSpouse1099OIDData.Form1099OIDId);
            Assert.AreEqual(expectedSpouseForm1099OIDForUpdate.FederalTaxWithHoldingAmount, actualSpouseForm1099.FederalTaxWithHoldingAmount);
            Assert.AreEqual(expectedSpouseForm1099OIDForUpdate.TaxableInterestAmount, actualSpouseForm1099.TaxableInterestAmount);
            Assert.AreEqual(expectedSpouseForm1099OIDForUpdate.Owner, actualSpouseForm1099.Owner);
            #endregion
        }
Example #8
0
        public void ValidateEicEiWithFilingStatusAsSingle()
        {
            //Persist Personal Info
            var primaryTaxPayer = IT_PersonalInfo.CreatePrimaryTaxPayer(FilingStatus.Single);

            primaryTaxPayer.Person.HasClaimedAsDependent = true;
            primaryTaxPayer.Person.DateOfBirth           = DateTime.Now;
            var expectedPrimaryTaxpayer = mPersonalInfoRepository.PersistPrimaryTaxPayer(primaryTaxPayer, mUserId, mUserDataId);

            //Persist W2
            var expectedWages = IT_W2Repository.CreateW2(EmploymentType.RegularW2Wages, OwnerType.PrimaryTaxPayer);

            expectedWages.FederalTaxWithholdingAmount = 15000.00;
            mTaxReturnData.TaxData    = JsonConvert.SerializeObject(expectedWages);
            mTaxReturnData.UserDataId = expectedPrimaryTaxpayer.Item1;
            mW2Data = mW2Repository.PersistW2TaxReturnData(mUserId, mTaxReturnData);

            //Get EIC
            mUserDTO.UserDataId = mW2Data.UserDataId;
            mUserDTO.UserId     = mUserId;
            var eic       = mEarnedIncomeCreditRepository.GetEarnedIncomeCredit(mUserDTO);
            var actualEic = (IEnumerable <ErrorMessage>)eic.Item4;

            var actualEI13ErrorMessage = actualEic.FirstOrDefault(x => x.ErrorCode == Constants.EIC_INFO_TAXPAYER_CLAIM_DEPENDENT);

            Assert.IsNotNull(actualEI13ErrorMessage.ErrorText);
            var actualEI15ErrorMessage = actualEic.FirstOrDefault(x => x.ErrorCode == Constants.EIC_INFO_TAXPAYER_AGE_LIMIT);

            Assert.IsNotNull(actualEI15ErrorMessage.ErrorText);
        }
        public void PersistAndDeleteForm1099OIDData()
        {
            var givenPrimaryTaxPayer = IT_PersonalInfo.CreatePrimaryTaxPayer(FilingStatus.Single);
            var userData             = mPersonalInfoRepository.PersistPrimaryTaxPayer(givenPrimaryTaxPayer, mUserId, mUserDataId);
            var expectedPrimayTaxPayerForm1099OID = CreateForm1099OID(OwnerType.PrimaryTaxPayer);

            //Serializing PrimaryTax payer Object
            mTaxReturnData.UserDataId = userData.Item1;
            mTaxReturnData.TaxData    = JsonConvert.SerializeObject(expectedPrimayTaxPayerForm1099OID);
            mUserData.userId          = mUserId;
            mUserData.TaxReturnData   = JsonConvert.SerializeObject(mTaxReturnData);

            //Persist Primary Tax Payer Form 1099OID
            var exepectedPrimaryTaxPayerUserData = mInterestIncomeRepository.PersistTaxReturnForm1099OIDData(mUserData);


            var expectedSpouseForm1099OID       = CreateForm1099OID(OwnerType.Spouse);
            var convertingSecondform1099OIDJson = JsonConvert.SerializeObject(expectedSpouseForm1099OID);

            mTaxReturnData.UserDataId = exepectedPrimaryTaxPayerUserData.UserDataId;
            mTaxReturnData.TaxData    = convertingSecondform1099OIDJson;
            mUserData.userId          = mUserId;
            mUserData.TaxReturnData   = JsonConvert.SerializeObject(mTaxReturnData);

            //Persist Spouse Form 1099INT
            var exepectedSpouseUserData = mInterestIncomeRepository.PersistTaxReturnForm1099OIDData(mUserData);

            //Delete second Form 1099INT
            var userDTO = new UserDTO
            {
                UserId     = mUserId,
                UserDataId = exepectedSpouseUserData.UserDataId,
                FormId     = exepectedSpouseUserData.Form1099OIDId
            };

            //Delete and Persist 1099OID object
            mInterestIncomeRepository.DeleteAndPersist1099OID(userDTO);

            //Getting the tax return data
            string taxObject             = mTaxReturnRepository.GetTaxReturnDatabyUserDataId(exepectedPrimaryTaxPayerUserData.UserDataId, mUserId);
            var    actualForm1099OIDList = JsonConvert.DeserializeObject <BusinessObject.Tax1040>(taxObject).Income.Form1099OID;

            var actualPrimaryTaxPayerForm1099OID =
                actualForm1099OIDList.FirstOrDefault(x => x.Form1099OIDId == exepectedPrimaryTaxPayerUserData.Form1099OIDId);

            //Validating existing values after deletion
            ValidateForm1099OIDInfoAfterPersist(actualPrimaryTaxPayerForm1099OID, expectedPrimayTaxPayerForm1099OID);

            var actualSpouseForm1099OID =
                actualForm1099OIDList.FirstOrDefault(x => x.Form1099OIDId == exepectedSpouseUserData.Form1099OIDId);

            Assert.IsNull(actualSpouseForm1099OID);
        }
Example #10
0
        public void RequiredForPhoneNumber()
        {
            bool HasErrorCode               = false;
            var  primaryTaxPayer            = CreateUser(FilingStatus.Single);
            var  userData                   = IT_PersonalInfo.CreatePrimaryTaxPayer(FilingStatus.Single);
            var  address                    = CreateAddress();
            var  userDataID                 = mPersonalInfoRepository.PersistAddress(address, mUserId, userDataId);
            var  result                     = mPersonalInfoRepository.GetPersonalDetailsByUserIdAndUserDataId(mUserId, userDataID);
            List <ErrorMessage> lsterrormsg = (result.Item2) as List <ErrorMessage>;

            HasErrorCode = lsterrormsg.Any(em => (em.ErrorCode == "Address_RF15"));
            Assert.IsTrue(HasErrorCode);
        }
        public void TaxableIncomeGreatherthanLakhDollars()
        {
            //Persist Personal Info
            const long mUserDataId             = 0L;
            var        primaryTaxPayer         = IT_PersonalInfo.CreatePrimaryTaxPayer(FilingStatus.Single);
            var        expectedPrimaryTaxpayer = mPersonalInfoRepository.PersistPrimaryTaxPayer(primaryTaxPayer, mUserId, mUserDataId);

            //Persist W2
            var wages = IT_W2Repository.CreateW2(EmploymentType.RegularW2Wages, OwnerType.PrimaryTaxPayer);

            wages.WagesAmount         = 41812.00;
            mTaxReturnData.TaxData    = JsonConvert.SerializeObject(wages);
            mTaxReturnData.UserDataId = expectedPrimaryTaxpayer.Item1;
            var expectedWages = mW2Repository.PersistW2TaxReturnData(mUserId, mTaxReturnData);

            //Persist Interest Income INT
            var expectedForm1099INT = IT_InterestIncomeForm1099INTRepository.CreateForm1099INT(OwnerType.PrimaryTaxPayer);

            expectedForm1099INT.InterestIncome = 100000.00;
            mTaxReturnData.UserDataId          = expectedWages.UserDataId;
            mTaxReturnData.TaxData             = JsonConvert.SerializeObject(expectedForm1099INT);
            mUserData.userId        = mUserId;
            mUserData.TaxReturnData = JsonConvert.SerializeObject(mTaxReturnData);
            var expectedUserData = mInterestIncomeRepository.PersistTaxReturnForm1099INTData(mUserData);

            //Persist Form 1099G
            var expectedForm1099G = IT_UnemploymentRepository.CreateForm1099G();

            expectedForm1099G.UnEmploymentCompensation = 1580.00;
            mTaxReturnData.TaxData    = JsonConvert.SerializeObject(expectedForm1099G);
            mTaxReturnData.UserDataId = expectedUserData.UserDataId;
            var expectedForm1099GData = mUnemploymentRepository.CreateAndPersistUnemployment(mUserId, mTaxReturnData);

            //Persist Taxes and Wrap Up
            var expectedTaxesAndWrapUp = CreateTaxesAndWrapWithoutData();

            mTaxReturnData.TaxData    = JsonConvert.SerializeObject(expectedTaxesAndWrapUp);
            mTaxReturnData.UserDataId = expectedForm1099GData.UserDataId;
            var expectedTaxesAndWrapUpData = mTaxesAndWrapUpRepository.PersistTaxesAndWrapUpData(mUserId, mTaxReturnData);
            var userDTO = new UserDTO()
            {
                UserId = mUserId, UserDataId = expectedTaxesAndWrapUpData.Item1
            };

            //Get Taxes and Wrap Up
            var actualTaxesAndWrapUp = mTaxesAndWrapUpRepository.GetFederalTaxSummary(userDTO);

            BusinessObject.Tax1040 actualTaxesAndWrapUpData = Utilities.GetTaxObjectByUserIdAndUserDataId(mUserId, expectedTaxesAndWrapUpData.Item1);
            Assert.IsTrue(actualTaxesAndWrapUpData.ErrorMessages.Any(er => er.ErrorCode.Equals("TaxesAndWrapUp_ER5")));
        }
Example #12
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);

        }
Example #13
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);
        }
Example #14
0
        public void ValidateEicBR3BR5BR6BR7()
        {
            //Persist Personal Info
            var primaryTaxPayer         = IT_PersonalInfo.CreatePrimaryTaxPayer(FilingStatus.Single);
            var expectedPrimaryTaxpayer = mPersonalInfoRepository.PersistPrimaryTaxPayer(primaryTaxPayer, mUserId, mUserDataId);

            //Persist W2
            var wages = IT_W2Repository.CreateW2(EmploymentType.RegularW2Wages, OwnerType.PrimaryTaxPayer);

            wages.FederalTaxWithholdingAmount = 10000.00;
            mTaxReturnData.TaxData            = JsonConvert.SerializeObject(wages);
            mTaxReturnData.UserDataId         = expectedPrimaryTaxpayer.Item1;
            var expectedWages = mW2Repository.PersistW2TaxReturnData(mUserId, mTaxReturnData);


            //Persist EIC
            var expectedEic = CreateEIC();

            expectedEic.HasValidSSN                          = false;
            expectedEic.IsInUSMorethanHalfYear               = false;
            expectedEic.HasClaimedAsQualifyingChild          = true;
            expectedEic.HasReceivedIRSNoticeOnEICNotEligible = true;
            mTaxReturnData.TaxData    = JsonConvert.SerializeObject(expectedEic);
            mTaxReturnData.UserDataId = expectedWages.UserDataId;
            var expectedEicUserDataId = mEarnedIncomeCreditRepository.PersitEarnedIncomeCredit(mUserId, mTaxReturnData, mYear);

            //Get EIC
            mUserDTO.UserDataId = expectedEicUserDataId;
            mUserDTO.UserId     = mUserId;
            BusinessObject.Tax1040 actualEicData = Utilities.GetTaxObjectByUserIdAndUserDataId(mUserDTO.UserId,
                                                                                               mUserDTO.UserDataId);

            // When "You & your Spouse(MFJ) have a valid SSN that allows you to work" check box not checked
            Assert.IsTrue(actualEicData.ErrorMessages.Any(er => er.ErrorCode.Equals("EarnedIncomeCredit_BR3")));
            // when "You & your Spouse (MFJ) lived in  the United States for more than half of the year(2014)" check box not checked
            Assert.IsTrue(actualEicData.ErrorMessages.Any(er => er.ErrorCode.Equals("EarnedIncomeCredit_BR5")));
            // When "You are claimed as Qualified Child in another person's tax return" check box not chenked
            Assert.IsTrue(actualEicData.ErrorMessages.Any(er => er.ErrorCode.Equals("EarnedIncomeCredit_BR6")));
            // When "You received notice from IRS as 'Not to Claim EIC" check box not chenked
            Assert.IsTrue(actualEicData.ErrorMessages.Any(er => er.ErrorCode.Equals("EarnedIncomeCredit_BR7")));
        }
        public void ValidateInterestIncomeER10()
        {
            //Persist personal data
            var givenPrimaryTaxPayer = IT_PersonalInfo.CreatePrimaryTaxPayer(FilingStatus.Single);
            var userDataID           = mPersonalInfoRepository.PersistPrimaryTaxPayer(givenPrimaryTaxPayer, mUserId, mUserDataId);
            var expectedForm1099OID  = CreateForm1099OID(OwnerType.PrimaryTaxPayer);

            expectedForm1099OID.TaxableInterestAmount = 1600;
            mTaxReturnData.UserDataId = userDataID.Item1;
            mTaxReturnData.TaxData    = JsonConvert.SerializeObject(expectedForm1099OID);
            mUserData.userId          = mUserId;
            mUserData.TaxReturnData   = JsonConvert.SerializeObject(mTaxReturnData);

            //Persist first Form 1099INT with InterestIncome =1600 value.
            var actualFormOIDData = mInterestIncomeRepository.PersistTaxReturnForm1099OIDData(mUserData);

            string taxObject     = mTaxReturnRepository.GetTaxReturnDatabyUserDataId(actualFormOIDData.UserDataId, mUserId);
            var    actualTax1040 = JsonConvert.DeserializeObject <BusinessObject.Tax1040>(taxObject);

            Assert.IsTrue(actualTax1040.ErrorMessages.Any(er => er.ErrorCode.Equals("InterestIncome_ER10")));
        }
Example #16
0
        public void ValidateEicEiWithFilingStatusAsMFJ()
        {
            // var hasEligibilityDiagnostics = false;
            //Persist Primary Taxpayer
            var primaryTaxPayer = IT_PersonalInfo.CreatePrimaryTaxPayer(FilingStatus.MarriedFilingJointly);

            primaryTaxPayer.Person.HasClaimedAsDependent = true;
            primaryTaxPayer.Person.DateOfBirth           = DateTime.Now;
            var expectedPrimaryTaxpayer = mPersonalInfoRepository.PersistPrimaryTaxPayer(primaryTaxPayer, mUserId, mUserDataId);

            //Persist Spouse
            var spouse = IT_PersonalInfo.CreateAndPersistSpouse(mUserId, expectedPrimaryTaxpayer.Item1);

            spouse.Person.HasClaimedAsDependent = true;
            spouse.Person.DateOfBirth           = DateTime.Now;
            var expectedSpouse = mPersonalInfoRepository.PersistSpouse(spouse, mUserId, expectedPrimaryTaxpayer.Item1);

            //Persist Wages Object
            var w2 = IT_W2Repository.CreateW2(EmploymentType.RegularW2Wages, OwnerType.PrimaryTaxPayer);

            w2.FederalTaxWithholdingAmount = 15000.00;
            mTaxReturnData.TaxData         = JsonConvert.SerializeObject(w2);
            mTaxReturnData.UserDataId      = expectedSpouse.Item1;
            mW2Data = mW2Repository.PersistW2TaxReturnData(mUserId, mTaxReturnData);

            //Get EIC
            mUserDTO.UserDataId = mW2Data.UserDataId;
            mUserDTO.UserId     = mUserId;

            var eic       = mEarnedIncomeCreditRepository.GetEarnedIncomeCredit(mUserDTO);
            var actualEic = (IEnumerable <ErrorMessage>)eic.Item4;

            var actualEI13ErrorMessage = actualEic.FirstOrDefault(x => x.ErrorCode == Constants.EIC_INFO_TAXPAYER_SPOUSE_CLAIM_DEPENDENT);

            Assert.IsNotNull(actualEI13ErrorMessage.ErrorText);
            var actualEI15ErrorMessage = actualEic.FirstOrDefault(x => x.ErrorCode == Constants.EIC_INFO_TAXPAYER_SPOUSE_AGE_LIMIT);

            Assert.IsNotNull(actualEI15ErrorMessage.ErrorText);
        }
Example #17
0
        public void PersistEicPrimaryTaxpayerAndSpouse()
        {
            var primaryTaxPayer    = IT_PersonalInfo.CreatePrimaryTaxPayer(FilingStatus.MarriedFilingJointly);
            var expectedUserDataId = mPersonalInfoRepository.PersistPrimaryTaxPayer(primaryTaxPayer, mUserId, mUserDataId);


            var expectedEic = CreateEIC();

            mTaxReturnData.TaxData    = JsonConvert.SerializeObject(expectedEic);
            mTaxReturnData.UserDataId = expectedUserDataId.Item1;

            //Persist EIC
            var expectedEicUserDataId = mEarnedIncomeCreditRepository.PersitEarnedIncomeCredit(mUserId, mTaxReturnData, mYear);

            //Get EIC
            mUserDTO.UserDataId = expectedEicUserDataId;
            mUserDTO.UserId     = mUserId;
            var eic       = mEarnedIncomeCreditRepository.GetEarnedIncomeCredit(mUserDTO);
            var actualEic = (EIC)eic.Item1;


            Assert.AreEqual(expectedEic.HasReceivedIRSNoticeOnEICNotEligible, actualEic.HasReceivedIRSNoticeOnFiling8862);
        }
        public void PersistForm1099OIDAsSpouse()
        {
            // Create and Persist PrimaryTaxPayer and Prepare Form1099OID object
            var primaryTaxPayer     = IT_PersonalInfo.CreatePrimaryTaxPayer(FilingStatus.Single);
            var userData            = mPersonalInfoRepository.PersistPrimaryTaxPayer(primaryTaxPayer, mUserId, mUserDataId);
            var expectedForm1099OID = CreateForm1099OID(OwnerType.Spouse);

            mTaxReturnData.TaxData    = JsonConvert.SerializeObject(expectedForm1099OID);
            mTaxReturnData.UserDataId = userData.Item1;
            mUserData.userId          = mUserId;
            mUserData.TaxReturnData   = JsonConvert.SerializeObject(mTaxReturnData);

            //Persist first Form 1099OID
            var actualForm1099OIDData = mInterestIncomeRepository.PersistTaxReturnForm1099OIDData(mUserData);

            string             taxObject             = mTaxReturnRepository.GetTaxReturnDatabyUserDataId(actualForm1099OIDData.UserDataId, mUserId);
            List <Form1099OID> actualForm1099OIDList = JsonConvert.DeserializeObject <BusinessObject.Tax1040>(taxObject).Income.Form1099OID;

            var actualForm1099OID =
                actualForm1099OIDList.FirstOrDefault(x => x.Form1099OIDId == actualForm1099OIDData.Form1099OIDId);

            ValidateForm1099OIDInfoAfterPersist(actualForm1099OID, expectedForm1099OID);
        }