Example #1
0
        public void TestCodePackageCreate_Catelog()
        {
            CodePeriodListChooser codePackageInfo = new CodePeriodListChooser();

            codePackageInfo.CodeChooseMethod = CodeChooseMethod.Catelog;
            codePackageInfo.Codes.Add("RB");
            codePackageInfo.Codes.Add("M");
            codePackageInfo.Codes.Add("A");
            codePackageInfo.Start = 20170101;
            codePackageInfo.End   = 20180101;

            IDataReader       dataReader  = TestDataCenter.Instance.DataReader;
            CodePeriodFactory fac         = new CodePeriodFactory(dataReader);
            ICodePeriodList   codePackage = fac.CreateCodePeriodList(codePackageInfo);

            Console.WriteLine(codePackage);
        }
Example #2
0
        public void TestCodePackageCreate_Normal()
        {
            CodePeriodListChooser codePackageInfo = new CodePeriodListChooser();

            codePackageInfo.CodeChooseMethod = CodeChooseMethod.Normal;
            codePackageInfo.Codes.Add("RB1705");
            codePackageInfo.Codes.Add("RB1709");
            codePackageInfo.Codes.Add("RB1801");
            codePackageInfo.Start = 20170101;
            codePackageInfo.End   = 20180101;

            IDataReader       dataReader  = TestDataCenter.Instance.DataReader;
            CodePeriodFactory fac         = new CodePeriodFactory(dataReader);
            ICodePeriodList   codePackage = fac.CreateCodePeriodList(codePackageInfo);

            Assert.AreEqual(3, codePackage.CodePeriods.Count);
            Assert.AreEqual(20170101, codePackage.CodePeriods[0].StartDate);
        }