Exemple #1
0
 public void Initialize()
 {
     string[] testConfigBuffer = { "" };
     string[] testReaderBuffer = { "" };
     _testRepository = new TestRepository(testConfigBuffer, testReaderBuffer);
     _reader         = new TotalTempReader(_testRepository);
 }
Exemple #2
0
        public void MillimanReader_MultipleRule_VariableNotExist_Integration_Test()
        {
            string[] multipleRuleConfig =
            {
                "CashPrem	MinValue	LastValue",
                "AvePolLoanYield	MaxValue	MaxValue",
                "test	Minvalue	MinValue",
                "ResvAssumed	Average	MinValue",
            };

            string[] expectedOutput =
            {
                "CashPrem	MinValue	84655914.86",
                "AvePolLoanYield	MaxValue	0.04",
                "test	Minvalue	No values found",
                "ResvAssumed	Average	-36815937.17"
            };

            TestRepository  testRepository  = new TestRepository(multipleRuleConfig, totalTempFile);
            ConfigReader    configReader    = new ConfigReader(testRepository, configRuleFactory);
            TotalTempReader totalTempReader = new TotalTempReader(testRepository);
            var             program         = new MillimanReader(testRepository, configReader, totalTempReader);

            program.RunReader();
            CollectionAssert.AreEqual(testRepository.OutputResult, expectedOutput);
        }
Exemple #3
0
        public void MillimanReader_SingleRule_Average_MaxValue_Integration_Test()
        {
            string[] singleRuleConfig = { "CashPrem	Average	MaxValue" };

            string[] expectedOutput =
            {
                "CashPrem	Average	134444848.07"
            };

            TestRepository  testRepository  = new TestRepository(singleRuleConfig, totalTempFile);
            ConfigReader    configReader    = new ConfigReader(testRepository, configRuleFactory);
            TotalTempReader totalTempReader = new TotalTempReader(testRepository);
            var             program         = new MillimanReader(testRepository, configReader, totalTempReader);

            program.RunReader();
            CollectionAssert.AreEqual(testRepository.OutputResult, expectedOutput);
        }