public PolicyTransactionFileSplitter_Split_Tests()
        {
            var transactionRecords = new string[5];

            transactionRecords[0] = "        |17G0120216|20150630|20150624|20150630|    64048.00|01|N|        0.00"; // New/Ren
            transactionRecords[1] = "        |35P0010116|20150630|20150624|20150630|   109280.00|02|N|        0.00"; // New/Ren
            transactionRecords[2] = "        |35P0010216|20150630|20150624|20150630|    46146.00|03|N|        0.00"; // All Else
            transactionRecords[3] = "        |29B2050115|20150621|20150624|20150621|    17904.00|04|N|        0.00"; // Canc/Rein
            transactionRecords[4] = "        |37R2010115|20150630|20150624|20150630|   150314.00|05|N|        0.00"; // Canc/Rein

            var policyRecords = new string[5];

            policyRecords[0] = "17G012  |17G0120216|20150630|20170630|02|03|MULTIYR10DOWN20PAY       |Y|0.1000|          ";
            policyRecords[1] = "35P001  |35P0010116|20150630|20170630|02|02|MULTIYR10DOWN20PAY       |Y|0.1000|          ";
            policyRecords[2] = "35P001  |35P0010216|20150630|20170630|02|03|MULTIYR10DOWN20PAY       |Y|0.1000|          ";
            policyRecords[3] = "29B205  |29B2050115|20150621|20160621|02|02|MONTHLY7PAY              |N|0.1000|          ";
            policyRecords[4] = "37R201  |37R2010115|20150630|20160630|02|02|MONTHLY7PAY              |N|0.1000|          ";

            var accountRecords = new string[4];

            accountRecords[0] = "17G012  |Some Insured 1                                     |                                                   |111 West Street                                    |                              |Ponchatoula                  |LA|70454|    |USA                 |                              |          |          |                                                  |1234  |Agency 1                                |09|                                                            |N|                                        |                             |  |     |    ";
            accountRecords[1] = "35P001  |Some Insured 2                                     |                                                   |112 West Street                                    |                              |Claremore                    |OK|74017|    |USA                 |                              |          |          |                                                  |5678  |Agency 2                                |09|                                                            |N|                                        |                             |  |     |    ";
            accountRecords[2] = "29B205  |Some Insured 3                                     |                                                   |113 West Street                                    |                              |Hammonton                    |NJ|08037|    |USA                 |                              |          |          |                                                  |9012  |Agency 3                                |09|                                                            |N|                                        |                             |  |     |    ";
            accountRecords[3] = "37R201  |Some Insured 4                                     |                                                   |114 West Street                                    |                              |Lehighton                    |PA|18235|    |USA                 |                              |          |          |                                                  |9012  |Agency 4                                |09|                                                            |N|                                        |                             |  |     |    ";

            _transactionsFileGroup = new FileGroup("x", false);
            _policiesFileGroup = new FileGroup("x", false);
            _accountsFileGroup = new FileGroup("x", false);

            _splitter = new PolicyTransactionFileSplitter();

            _splitter.SplitTransactionRecords(_transactionsFileGroup, transactionRecords);
            _splitter.SplitPolicyRecords(_policiesFileGroup, policyRecords);
            _splitter.SplitAccountRecords(_accountsFileGroup, accountRecords);
        }
예제 #2
0
        private void btnGo_Click(object sender, EventArgs e)
        {
            txtStatus.Text = "running...";

            var splitter = new PolicyTransactionFileSplitter();

            txtStatus.Text = splitter.SplitFiles();
        }
        public void Splitter_Sets_Paths()
        {
            var splitter = new PolicyTransactionFileSplitter();

            Assert.Equal(@"C:\Dev\jstrope\_TestFiles\Billing-Adapter\Split\PLM_Accounts.txt", splitter.AccountFilePath);
            Assert.Equal(@"C:\Dev\jstrope\_TestFiles\Billing-Adapter\Split\PLM_Policies.txt", splitter.PolicyFilePath);
            Assert.Equal(@"C:\Dev\jstrope\_TestFiles\Billing-Adapter\Split\PLM_Transactions.txt", splitter.TransactionFilePath);
        }