示例#1
0
        public void GAAP_GetLabelData_06_15()
        {
            TestLabel tl = new TestLabel();

            tl.Load( US_GAAP_FILE_06_15 );

            int errors = 0;
            tl.ParseInternal( out errors );
            Assert.AreEqual( 0, errors, "wrong number of errors returned" );
            Assert.AreEqual(4, tl.LabelTable.Count);

            LabelLocator ll = tl.LabelTable["usfr-pt_ChangeInBalances"] as LabelLocator;
            Assert.IsNotNull( ll, "usfr-pt_ChangeInBalances is null" );
            string info = null;

            Assert.IsTrue( ll.TryGetInfo( "en", "label", out info ), "tryGetInfo failed for usfr-pt_ChangeInBalances" );
            Assert.AreEqual( "Statement of Cash Flows", info, "Statement of Cash Flows incorrect" );

            ll = tl.labels["usfr-pt_FinancialAccountingConcepts"] as LabelLocator;
            Assert.IsNotNull( ll, "usfr-pt_FinancialAccountingConcepts is null" );
            Assert.IsTrue( ll.TryGetInfo( "en", "label", out info ), "tryGetInfo failed for usfr-pt_FinancialAccountingConcepts" );
            Assert.AreEqual( "Financial Accounting Concepts", info, "Financial Accounting Concepts incorrect" );

            ll = tl.labels["usfr-pt_GeneralConcepts"] as LabelLocator;
            Assert.IsNotNull( ll, "usfr-pt_GeneralConcepts is null" );
            Assert.IsTrue( ll.TryGetInfo( "en", "label", out info ), "tryGetInfo failed for usfr-pt_GeneralConcepts" );
            Assert.AreEqual( "US GAAP - Commercial and Industrial", info, "US GAAP - Commercial and Industrial incorrect" );

            ll = tl.labels["usfr-pt_NonOperatingIncomeExpenseAbstract"] as LabelLocator;
            Assert.IsNotNull( ll, "usfr-pt_NonOperatingIncomeExpenseAbstract is null" );
            Assert.IsTrue( ll.TryGetInfo( "en", "label", out info ), "tryGetInfo failed for usfr-pt_NonOperatingIncomeExpenseAbstract" );
            Assert.AreEqual( "Nonoperating Income:", info, "Nonoperating Income: incorrect" );
        }
示例#2
0
        public void GAAP_GetLabelData_06_15()
        {
            TestLabel tl = new TestLabel();

            tl.Load(US_GAAP_FILE_06_15);

            int errors = 0;

            tl.ParseInternal(out errors);
            Assert.AreEqual(0, errors, "wrong number of errors returned");
            Assert.AreEqual(4, tl.LabelTable.Count);

            LabelLocator ll = tl.LabelTable["usfr-pt_ChangeInBalances"] as LabelLocator;

            Assert.IsNotNull(ll, "usfr-pt_ChangeInBalances is null");
            string info = null;

            Assert.IsTrue(ll.TryGetInfo("en", "label", out info), "tryGetInfo failed for usfr-pt_ChangeInBalances");
            Assert.AreEqual("Statement of Cash Flows", info, "Statement of Cash Flows incorrect");

            ll = tl.labels["usfr-pt_FinancialAccountingConcepts"] as LabelLocator;
            Assert.IsNotNull(ll, "usfr-pt_FinancialAccountingConcepts is null");
            Assert.IsTrue(ll.TryGetInfo("en", "label", out info), "tryGetInfo failed for usfr-pt_FinancialAccountingConcepts");
            Assert.AreEqual("Financial Accounting Concepts", info, "Financial Accounting Concepts incorrect");

            ll = tl.labels["usfr-pt_GeneralConcepts"] as LabelLocator;
            Assert.IsNotNull(ll, "usfr-pt_GeneralConcepts is null");
            Assert.IsTrue(ll.TryGetInfo("en", "label", out info), "tryGetInfo failed for usfr-pt_GeneralConcepts");
            Assert.AreEqual("US GAAP - Commercial and Industrial", info, "US GAAP - Commercial and Industrial incorrect");

            ll = tl.labels["usfr-pt_NonOperatingIncomeExpenseAbstract"] as LabelLocator;
            Assert.IsNotNull(ll, "usfr-pt_NonOperatingIncomeExpenseAbstract is null");
            Assert.IsTrue(ll.TryGetInfo("en", "label", out info), "tryGetInfo failed for usfr-pt_NonOperatingIncomeExpenseAbstract");
            Assert.AreEqual("Nonoperating Income:", info, "Nonoperating Income: incorrect");
        }
示例#3
0
        public void PT_GetLabelData_06_15()
        {
            TestLabel tl = new TestLabel();

            tl.Load(PT_GAAP_FILE_06_15);

            int      errors = 0;
            DateTime start  = DateTime.Now;

            tl.ParseInternal(out errors);
            Console.WriteLine("Parse PT label 06-15 file took {0}", DateTime.Now - start);

            Assert.AreEqual(0, errors);
            Assert.AreEqual(1478, tl.labels.Count);
        }
示例#4
0
        public void PT_GetSupportedLanguages_06_15()
        {
            TestLabel tl = new TestLabel();

            tl.Load(PT_GAAP_FILE_06_15);

            int errors = 0;

            tl.ParseInternal(out errors);

            ArrayList temp = tl.supportedLanguages;

            Assert.AreEqual(0, errors);
            Assert.AreEqual(1, temp.Count, "wrong number of languages returned");
            Assert.AreEqual("en", temp[0]);
        }
示例#5
0
        public void GAAP_GetLabelRoles_07_06()
        {
            TestLabel tl = new TestLabel();

            tl.Load(US_GAAP_FILE_07_06);

            int errors = 0;

            tl.ParseInternal(out errors);

            ArrayList roles = tl.labelRoles;

            Assert.AreEqual(0, errors);
            Assert.AreEqual(1, roles.Count);
            Assert.AreEqual("label", roles[0]);
        }
示例#6
0
        public void GAAP2_GetSupportedLanguages()
        {
            TestLabel tl = new TestLabel();

            tl.Load( US_GAAP2_FILE );

            int errors = 0;
            tl.ParseInternal(out errors);

            ArrayList temp = tl.supportedLanguages;

            Assert.AreEqual( 0, errors );
            Assert.AreEqual( 4, temp.Count, "wrong number of languages returned" );
            Assert.AreEqual( "aa", temp[0] );
            Assert.AreEqual( "cc", temp[1] );
            Assert.AreEqual( "en", temp[2] );
            Assert.AreEqual( "zz", temp[3] );
        }
示例#7
0
        public void GAAP2_GetSupportedLanguages()
        {
            TestLabel tl = new TestLabel();

            tl.Load(US_GAAP2_FILE);

            int errors = 0;

            tl.ParseInternal(out errors);

            ArrayList temp = tl.supportedLanguages;

            Assert.AreEqual(0, errors);
            Assert.AreEqual(4, temp.Count, "wrong number of languages returned");
            Assert.AreEqual("aa", temp[0]);
            Assert.AreEqual("cc", temp[1]);
            Assert.AreEqual("en", temp[2]);
            Assert.AreEqual("zz", temp[3]);
        }
示例#8
0
        public void PT_GetLabelData2_07_06()
        {
            TestLabel tl = new TestLabel();

            tl.Load(PT_GAAP_FILE_07_06);

            int      errors = 0;
            DateTime start  = DateTime.Now;

            tl.ParseInternal(out errors);
            DateTime end = DateTime.Now;

            Console.WriteLine("Parse PT label2 took {0}", end - start);

            Assert.AreEqual(0, errors);
            Assert.AreEqual(1556, tl.labels.Count);
            TimeSpan limit = new TimeSpan(0, 0, 0, 0, 750);                     // allow 750 millisecondstwo seconds to load

            Assert.IsTrue(limit > (end - start), "Parse labels takes too long");
        }
示例#9
0
        public void PT_GetLabelRoles_07_06()
        {
            TestLabel tl = new TestLabel();

            tl.Load(PT_GAAP_FILE_07_06);

            int errors = 0;

            tl.ParseInternal(out errors);

            ArrayList roles = tl.labelRoles;

            Assert.AreEqual(0, errors);
            Assert.AreEqual(6, roles.Count);
            Assert.AreEqual("documentation", roles[0]);
            Assert.AreEqual("label", roles[1]);
            Assert.AreEqual("periodEndLabel", roles[2]);
            Assert.AreEqual("periodStartLabel", roles[3]);
            Assert.AreEqual("terseLabel", roles[4]);
            Assert.AreEqual("totalLabel", roles[5]);
        }
示例#10
0
        public void PT_GetSupportedLanguages_07_06()
        {
            TestLabel tl = new TestLabel();

            tl.Load( PT_GAAP_FILE_07_06 );

            int errors = 0;
            tl.ParseInternal(out errors);

            ArrayList temp = tl.supportedLanguages;

            Assert.AreEqual( 0, errors );
            Assert.AreEqual( 1, temp.Count, "wrong number of languages returned" );
            Assert.AreEqual( "en", temp[0] );
        }
示例#11
0
        public void PT_GetLabelRoles_07_06()
        {
            TestLabel tl = new TestLabel();

            tl.Load( PT_GAAP_FILE_07_06 );

            int errors = 0;
            tl.ParseInternal(out errors);

            ArrayList roles = tl.labelRoles;

            Assert.AreEqual( 0, errors );
            Assert.AreEqual( 6, roles.Count );
            Assert.AreEqual( "documentation", roles[0] );
            Assert.AreEqual( "label", roles[1] );
            Assert.AreEqual( "periodEndLabel", roles[2] );
            Assert.AreEqual( "periodStartLabel", roles[3] );
            Assert.AreEqual( "terseLabel", roles[4] );
            Assert.AreEqual( "totalLabel", roles[5] );
        }
示例#12
0
        public void PT_GetLabelData_07_06()
        {
            TestLabel tl = new TestLabel();

            tl.Load( PT_GAAP_FILE_07_06 );

            int errors = 0;
            DateTime start = DateTime.Now;
            tl.ParseInternal( out errors );
            Console.WriteLine( "Parse PT label 07-06 file took {0}", DateTime.Now-start );

            Assert.AreEqual( 0, errors );
            Assert.AreEqual( 1556, tl.labels.Count );
        }
示例#13
0
        public void PT_GetLabelData2_07_06()
        {
            TestLabel tl = new TestLabel();

            tl.Load( PT_GAAP_FILE_07_06 );

            int errors = 0;
            DateTime start = DateTime.Now;
            tl.ParseInternal( out errors );
            DateTime end = DateTime.Now;

            Console.WriteLine( "Parse PT label2 took {0}", end-start );

            Assert.AreEqual( 0, errors );
            Assert.AreEqual( 1556, tl.labels.Count );
            TimeSpan limit = new TimeSpan( 0, 0, 0, 0, 750 );	// allow 750 millisecondstwo seconds to load
            Assert.IsTrue( limit > (end-start), "Parse labels takes too long" );
        }
示例#14
0
        public void GAAP_GetLabelRoles_07_06()
        {
            TestLabel tl = new TestLabel();

            tl.Load( US_GAAP_FILE_07_06);

            int errors = 0;
            tl.ParseInternal(out errors);

            ArrayList roles = tl.labelRoles;

            Assert.AreEqual( 0, errors );
            Assert.AreEqual( 1, roles.Count );
            Assert.AreEqual( "label", roles[0] );
        }