Exemplo n.º 1
0
        [Test] public void GAAP_VerifyPresentationTypes()
        {
            TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15();

            int errors = 0;

            if (s.Load(US_GAAP_FILE, out errors) != true)
            {
                Assert.Fail((string)s.ErrorList[0]);
            }

            errors = 0;

            //s.TestParse( out errors );
            //Assert.AreEqual( 22, errors, "parse failed" );
            s.LoadRoleTypes(out errors);
            Assert.AreEqual(0, errors, "load role types returned the wrong number of errors");

            errors = 0;
            Presentation p = s.LoadPresentationSchema(out errors);

            Assert.AreEqual(22, errors, "presentation schema failed");
            Assert.IsNotNull(p);

            if (s.VerifyPresentationTypes(p, out errors) == false)
            {
                Assert.Fail("There are " + errors + " failures in the VerifyPresentationTypes call");
            }
        }
Exemplo n.º 2
0
        [Test] public void PT_VerifyPresentationTypes()
        {
            TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15();

            s.Load(PT_GAAP_FILE);

            int errors = 0;

            s.LoadRoleTypes(out errors);
            //s.TestParse( out errors );
            Assert.AreEqual(0, errors, "load role types failure");

            Presentation p = s.LoadPresentationSchema(out errors);

            Assert.AreEqual(4, errors);
            Assert.IsNotNull(p);

            if (s.VerifyPresentationTypes(p, out errors) == false)
            {
                Assert.Fail("There are " + errors + " failures in the VerifyPresentationTypes call");
            }
        }
Exemplo n.º 3
0
        [Test] public void Test_LoadRoleTypes()
        {
            TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15();

            s.Load(US_GAAP_FILE);

            int errors = 0;

            s.LoadRoleTypes(out errors);
            Assert.AreEqual(0, errors);

            Assert.AreEqual(6, s.roleTypes.Count);

            Assert.IsTrue(s.roleTypes.ContainsKey("http://www.xbrl.org/taxonomy/us/fr/gaap/role/IncomeStatement"));
            Assert.IsTrue(s.roleTypes.ContainsKey("http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementFinancialPosition"));
            Assert.IsTrue(s.roleTypes.ContainsKey("http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementCashFlowsIndirect"));
            Assert.IsTrue(s.roleTypes.ContainsKey("http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementCashFlowsDirect"));
            Assert.IsTrue(s.roleTypes.ContainsKey("http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementStockholdersEquity"));
            Assert.IsTrue(s.roleTypes.ContainsKey("http://www.xbrl.org/taxonomy/us/fr/gaap/role/TotalStockholdersEquityCalculation"));

            RoleType     t  = s.roleTypes["http://www.xbrl.org/taxonomy/us/fr/gaap/role/IncomeStatement"] as RoleType;
            TestRoleType rt = new TestRoleType(t);

            Assert.IsNotNull(rt);

            Assert.AreEqual("IncomeStatement", rt.Id);
            Assert.AreEqual("http://www.xbrl.org/taxonomy/us/fr/gaap/role/IncomeStatement", rt.Uri);
            Assert.AreEqual(2, rt.WhereUsed.Count);
            Assert.AreEqual("link:presentationLink", rt.WhereUsed[0]);
            Assert.AreEqual("link:calculationLink", rt.WhereUsed[1]);

            // StatementFinancialPosition
            t  = s.roleTypes["http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementFinancialPosition"] as RoleType;
            rt = new TestRoleType(t);
            Assert.IsNotNull(rt);

            Assert.AreEqual("StatementFinancialPosition", rt.Id);
            Assert.AreEqual("http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementFinancialPosition", rt.Uri);
            Assert.AreEqual(2, rt.WhereUsed.Count);
            Assert.AreEqual("link:presentationLink", rt.WhereUsed[0]);
            Assert.AreEqual("link:calculationLink", rt.WhereUsed[1]);

            // StatementCashFlowsIndirect
            t  = s.roleTypes["http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementCashFlowsIndirect"] as RoleType;
            rt = new TestRoleType(t);
            Assert.IsNotNull(rt);

            Assert.AreEqual("StatementCashFlowsIndirect", rt.Id);
            Assert.AreEqual("http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementCashFlowsIndirect", rt.Uri);
            Assert.AreEqual(2, rt.WhereUsed.Count);
            Assert.AreEqual("link:presentationLink", rt.WhereUsed[0]);
            Assert.AreEqual("link:calculationLink", rt.WhereUsed[1]);

            // StatementCashFlowsDirect
            t  = s.roleTypes["http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementCashFlowsDirect"] as RoleType;
            rt = new TestRoleType(t);
            Assert.IsNotNull(rt);

            Assert.AreEqual("StatementCashFlowsDirect", rt.Id);
            Assert.AreEqual("http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementCashFlowsDirect", rt.Uri);
            Assert.AreEqual(2, rt.WhereUsed.Count);
            Assert.AreEqual("link:presentationLink", rt.WhereUsed[0]);
            Assert.AreEqual("link:calculationLink", rt.WhereUsed[1]);

            // StatementStockholdersEquity
            t  = s.roleTypes["http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementStockholdersEquity"] as RoleType;
            rt = new TestRoleType(t);
            Assert.IsNotNull(rt);

            Assert.AreEqual("StatementStockholdersEquity", rt.Id);
            Assert.AreEqual("http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementStockholdersEquity", rt.Uri);
            Assert.AreEqual(2, rt.WhereUsed.Count);
            Assert.AreEqual("link:presentationLink", rt.WhereUsed[0]);
            Assert.AreEqual("link:calculationLink", rt.WhereUsed[1]);

            // TotalStockholdersEquityCalculation
            t  = s.roleTypes["http://www.xbrl.org/taxonomy/us/fr/gaap/role/TotalStockholdersEquityCalculation"] as RoleType;
            rt = new TestRoleType(t);
            Assert.IsNotNull(rt);

            Assert.AreEqual("TotalStockholdersEquityCalculation", rt.Id);
            Assert.AreEqual("http://www.xbrl.org/taxonomy/us/fr/gaap/role/TotalStockholdersEquityCalculation", rt.Uri);
            Assert.AreEqual(1, rt.WhereUsed.Count);
            Assert.AreEqual("link:calculationLink", rt.WhereUsed[0]);
        }
Exemplo n.º 4
0
        public void ifrs_VerifyPresentationTypes()
        {
            TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15();

            int errors = 0;

            if ( s.Load( IFRS_FILE, out errors ) != true )
            {
                Assert.Fail( (string)s.ErrorList[0]);
            }

            errors = 0;

            //s.TestParse( out errors );
            //Assert.AreEqual( 22, errors, "parse failed" );
            s.LoadRoleTypes( out errors );
            Assert.AreEqual( 0, errors, "load role types returned the wrong number of errors" );

            errors = 0;
            Presentation p = s.LoadPresentationSchema( out errors );
            Assert.AreEqual(144, errors, "presentation schema failed" );
            Assert.IsNotNull( p );

            if ( s.VerifyPresentationTypes( p, out errors ) == false )
            {
                Assert.Fail( "There are " + errors + " failures in the VerifyPresentationTypes call" );
            }
        }
Exemplo n.º 5
0
        public void PT_VerifyPresentationTypes()
        {
            TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15();

            s.Load( PT_GAAP_FILE);

            int errors = 0;

            s.LoadRoleTypes( out errors );
            //s.TestParse( out errors );
            Assert.AreEqual( 0, errors, "load role types failure" );

            Presentation p = s.LoadPresentationSchema( out errors );
            Assert.AreEqual(4, errors );
            Assert.IsNotNull( p );

            if ( s.VerifyPresentationTypes( p, out errors ) == false )
            {
                Assert.Fail( "There are " + errors + " failures in the VerifyPresentationTypes call" );
            }
        }
Exemplo n.º 6
0
        public void Test_LoadRoleTypes()
        {
            TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15();

            s.Load( US_GAAP_FILE );

            int errors = 0;
            s.LoadRoleTypes( out errors );
            Assert.AreEqual( 0, errors );

            Assert.AreEqual( 6, s.roleTypes.Count );

            Assert.IsTrue( s.roleTypes.ContainsKey( "http://www.xbrl.org/taxonomy/us/fr/gaap/role/IncomeStatement" ) );
            Assert.IsTrue( s.roleTypes.ContainsKey( "http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementFinancialPosition" ) );
            Assert.IsTrue( s.roleTypes.ContainsKey( "http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementCashFlowsIndirect" ) );
            Assert.IsTrue( s.roleTypes.ContainsKey( "http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementCashFlowsDirect" ) );
            Assert.IsTrue( s.roleTypes.ContainsKey( "http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementStockholdersEquity" ) );
            Assert.IsTrue( s.roleTypes.ContainsKey( "http://www.xbrl.org/taxonomy/us/fr/gaap/role/TotalStockholdersEquityCalculation" ) );

            RoleType t = s.roleTypes["http://www.xbrl.org/taxonomy/us/fr/gaap/role/IncomeStatement"] as RoleType;
            TestRoleType rt = new TestRoleType( t );

            Assert.IsNotNull( rt );

            Assert.AreEqual( "IncomeStatement", rt.Id );
            Assert.AreEqual( "http://www.xbrl.org/taxonomy/us/fr/gaap/role/IncomeStatement", rt.Uri );
            Assert.AreEqual( 2, rt.WhereUsed.Count );
            Assert.AreEqual( "link:presentationLink", rt.WhereUsed[0] );
            Assert.AreEqual( "link:calculationLink", rt.WhereUsed[1] );

            // StatementFinancialPosition
            t = s.roleTypes["http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementFinancialPosition"] as RoleType;
            rt = new TestRoleType( t );
            Assert.IsNotNull( rt );

            Assert.AreEqual( "StatementFinancialPosition", rt.Id );
            Assert.AreEqual( "http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementFinancialPosition", rt.Uri );
            Assert.AreEqual( 2, rt.WhereUsed.Count );
            Assert.AreEqual( "link:presentationLink", rt.WhereUsed[0] );
            Assert.AreEqual( "link:calculationLink", rt.WhereUsed[1] );

            // StatementCashFlowsIndirect
            t = s.roleTypes["http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementCashFlowsIndirect"] as RoleType;
            rt = new TestRoleType( t );
            Assert.IsNotNull( rt );

            Assert.AreEqual( "StatementCashFlowsIndirect", rt.Id );
            Assert.AreEqual( "http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementCashFlowsIndirect", rt.Uri );
            Assert.AreEqual( 2, rt.WhereUsed.Count );
            Assert.AreEqual( "link:presentationLink", rt.WhereUsed[0] );
            Assert.AreEqual( "link:calculationLink", rt.WhereUsed[1] );

            // StatementCashFlowsDirect
            t = s.roleTypes["http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementCashFlowsDirect"] as RoleType;
            rt = new TestRoleType( t );
            Assert.IsNotNull( rt );

            Assert.AreEqual( "StatementCashFlowsDirect", rt.Id );
            Assert.AreEqual( "http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementCashFlowsDirect", rt.Uri );
            Assert.AreEqual( 2, rt.WhereUsed.Count );
            Assert.AreEqual( "link:presentationLink", rt.WhereUsed[0] );
            Assert.AreEqual( "link:calculationLink", rt.WhereUsed[1] );

            // StatementStockholdersEquity
            t = s.roleTypes["http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementStockholdersEquity"] as RoleType;
            rt = new TestRoleType( t );
            Assert.IsNotNull( rt );

            Assert.AreEqual( "StatementStockholdersEquity", rt.Id );
            Assert.AreEqual( "http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementStockholdersEquity", rt.Uri );
            Assert.AreEqual( 2, rt.WhereUsed.Count );
            Assert.AreEqual( "link:presentationLink", rt.WhereUsed[0] );
            Assert.AreEqual( "link:calculationLink", rt.WhereUsed[1] );

            // TotalStockholdersEquityCalculation
            t = s.roleTypes["http://www.xbrl.org/taxonomy/us/fr/gaap/role/TotalStockholdersEquityCalculation"] as RoleType;
            rt = new TestRoleType( t );
            Assert.IsNotNull( rt );

            Assert.AreEqual( "TotalStockholdersEquityCalculation", rt.Id );
            Assert.AreEqual( "http://www.xbrl.org/taxonomy/us/fr/gaap/role/TotalStockholdersEquityCalculation", rt.Uri );
            Assert.AreEqual( 1, rt.WhereUsed.Count );
            Assert.AreEqual( "link:calculationLink", rt.WhereUsed[0] );
        }