Exemple #1
0
        [Test] public void GAAP_VerifyPresentationTypes()
        {
            TestSchema s = new TestSchema();

            ErrorInfo ei = null;

            if (s.Load(US_GAAP_FILE, out ei) != true)
            {
                Assert.IsNotNull(ei);
                Assert.Fail(ei.ExceptionMsg);
            }

            int errors = 0;

            s.TestParse(out errors);
            Assert.AreEqual(27, errors, "parse failed");

            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");
            }
        }
Exemple #2
0
        [Test] public void PT_VerifyPresentationTypes()
        {
            TestSchema s = new TestSchema();

            ErrorInfo ei = null;

            if (s.Load(PT_GAAP_FILE, out ei) != true)
            {
                Assert.IsNotNull(ei);
                Assert.Fail(ei.ExceptionMsg);
            }

            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");
            }
        }
Exemple #3
0
        [Test][Ignore("Need to implement label")] public void GAAP_ReadElements()
        {
            TestSchema s = new TestSchema();

            ErrorInfo ei = null;

            if (s.Load(US_GAAP_FILE, out ei) == false)
            {
                Assert.Fail(ei.ExceptionMsg);
            }

            if (ei != null)
            {
                Assert.Fail(ei.ExceptionMsg);
            }
//			int errors = 0;
//			int numElements = s.LoadElements( out errors );
//			Assert.AreEqual( 0, errors );
////			Assert.AreEqual( 5, numElements, "No Elements Found" );
//			Assert.AreEqual( 5, s.elements.Count );
//
//			Assert.IsTrue( s.elements.ContainsKey( "Name" ) );
//			Assert.IsTrue( s.elements.ContainsKey( "Number" ) );
//			Assert.IsTrue( s.elements.ContainsKey( "Chapter" ) );
//			Assert.IsTrue( s.elements.ContainsKey( "Paragraph" ) );
//			Assert.IsTrue( s.elements.ContainsKey( "Subparagraph" ) );
        }
Exemple #4
0
        [Test] public void SAG_LoadSchema()
        {
            TestSchema s  = new TestSchema();
            ErrorInfo  ei = null;

            Assert.AreEqual(true, s.Load(SAG_FILE, out ei), "Could not load SoftwareAG file");
            Assert.IsNull(ei);
        }
Exemple #5
0
        [Test] public void GAAP_LoadSchema()
        {
            TestSchema s = new TestSchema();

            ErrorInfo ei = null;

            Assert.AreEqual(true, s.Load(US_GAAP_FILE, out ei), "Could not load US GAAP File");
            Assert.IsNull(ei);
        }
Exemple #6
0
        [Test] public void PT_TargetNamespace()
        {
            TestSchema s = new TestSchema();

            ErrorInfo ei = null;

            Assert.AreEqual(true, s.Load(PT_GAAP_FILE, out ei), "Could not load PT GAAP File");
            Assert.IsNull(ei);

            s.GetTargetNamespace();

            Assert.AreEqual("http://www.xbrl.org/taxonomy/us/fr/common/pt/usfr-pt-2004-06-15", s.targetNamespace);
        }
Exemple #7
0
        [Test][Ignore("Do later")] public void GAAP_GetSupportedLanguages()
        {
            TestSchema s = new TestSchema();

            ErrorInfo ei = null;

            Assert.AreEqual(true, s.Load(US_GAAP_FILE, out ei), "Could not load US GAAP File");
            Assert.IsNull(ei);

            s.GetSupportedLanguages();

            //Assert.AreEqual( "http://www.xbrl.org/taxonomy/us/fr/gaap/ci/2003-07-07", s.targetNamespace );
        }
Exemple #8
0
        [Test] public void GAAP_TargetNamespace()
        {
            TestSchema s = new TestSchema();

            ErrorInfo ei = null;

            Assert.AreEqual(true, s.Load(US_GAAP_FILE, out ei), "Could not load US GAAP File");
            Assert.IsNull(ei);

            s.GetTargetNamespace();

            Assert.AreEqual("http://www.xbrl.org/taxonomy/us/fr/gaap/ci/us-gaap-ci-2004-06-15", s.targetNamespace);
        }
Exemple #9
0
        [Test][Ignore("do this later")] public void SAG_GetLinkbaseRef_Presentation()
        {
            TestSchema s = new TestSchema();

            ErrorInfo ei = null;

            Assert.AreEqual(true, s.Load(SAG_FILE, out ei), "Could not load SAG File");
            Assert.IsNull(ei);

            string labelRef = s.GetLinkbaseReference(TestSchema.TARGET_LINKBASE_URI + TestSchema.PRESENTATION_ROLE);

            Assert.AreEqual("blue", labelRef);
        }
Exemple #10
0
        public void GAAP_GetSupportedLanguages()
        {
            TestSchema s = new TestSchema();

            ErrorInfo ei = null;

            Assert.AreEqual( true, s.Load( US_GAAP_FILE, out ei ), "Could not load US GAAP File" );
            Assert.IsNull( ei );

            s.GetSupportedLanguages();

            //Assert.AreEqual( "http://www.xbrl.org/taxonomy/us/fr/gaap/ci/2003-07-07", s.targetNamespace );
        }
Exemple #11
0
        [Test][Ignore("Worry about this later")] public void SAG_TargetNamespace()
        {
            TestSchema s = new TestSchema();

            ErrorInfo ei = null;

            Assert.AreEqual(true, s.Load(SAG_FILE, out ei), "Could not load SoftwareAge File");
            Assert.IsNull(ei);

            s.GetTargetNamespace();

            Assert.IsNull(ei);
            Assert.IsNull(s.targetNamespace);
        }
Exemple #12
0
        public void GAAP_LoadPresentationSchema()
        {
            TestSchema s = new TestSchema();

            ErrorInfo ei = null;

            if ( s.Load( US_GAAP_FILE, out ei ) != true )
            {
                Assert.IsNotNull( ei );
                Assert.Fail( ei.ExceptionMsg );
            }

            int errors = 0;
            Presentation p = s.LoadPresentationSchema( out errors );
            Assert.IsNotNull( p );
            Assert.AreEqual( 22, errors );
        }
Exemple #13
0
        [Test] public void GAAP_LoadPresentationSchema()
        {
            TestSchema s = new TestSchema();

            ErrorInfo ei = null;

            if (s.Load(US_GAAP_FILE, out ei) != true)
            {
                Assert.IsNotNull(ei);
                Assert.Fail(ei.ExceptionMsg);
            }

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

            Assert.IsNotNull(p);
            Assert.AreEqual(22, errors);
        }
Exemple #14
0
        [Test] public void PT_ReadElements()
        {
            TestSchema s = new TestSchema();

            ErrorInfo ei = null;

            Assert.AreEqual(true, s.Load(PT_GAAP_FILE, out ei), "Could not load PT GAAP File");
            Assert.IsNull(ei);

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

            Assert.AreEqual(4, errors, "load presentation failed");

            s.presentationInfo = p.PresentationLinks;

            s.LoadElements(out errors);
            Assert.AreEqual(1052, errors, "load elements failed");
        }
Exemple #15
0
        public void GAAP_GetLinkbaseRef_Presentation()
        {
            TestSchema s = new TestSchema();

            ErrorInfo ei = null;

            Assert.AreEqual( true, s.Load( US_GAAP_FILE, out ei ), "Could not load US GAAP File" );
            Assert.IsNull( ei );

            string presRef = s.GetLinkbaseReference( TestSchema.TARGET_LINKBASE_URI + TestSchema.PRESENTATION_ROLE );

            if ( ei != null )
            {
                throw new Exception( ei.ExceptionMsg );
            }

            #if AUTOMATED
            Assert.AreEqual( @"q:\MAX\axe\XBRLParser\TestSchemas\XBRL 2.1 Updated\us-gaap-ci-2004-06-15-presentation.xml", presRef );
            #else
            Assert.AreEqual( @"c:\Aucent\MAX\axe\XBRLParser\TestSchemas\XBRL 2.1 Updated\us-gaap-ci-2004-06-15-presentation.xml", presRef );
            #endif
        }
Exemple #16
0
        [Test] public void GAAP_GetLinkbaseRef_Presentation()
        {
            TestSchema s = new TestSchema();

            ErrorInfo ei = null;

            Assert.AreEqual(true, s.Load(US_GAAP_FILE, out ei), "Could not load US GAAP File");
            Assert.IsNull(ei);

            string presRef = s.GetLinkbaseReference(TestSchema.TARGET_LINKBASE_URI + TestSchema.PRESENTATION_ROLE);

            if (ei != null)
            {
                throw new Exception(ei.ExceptionMsg);
            }

#if AUTOMATED
            Assert.AreEqual(@"q:\MAX\axe\XBRLParser\TestSchemas\XBRL 2.1 Updated\us-gaap-ci-2004-06-15-presentation.xml", presRef);
#else
            Assert.AreEqual(@"c:\Aucent\MAX\axe\XBRLParser\TestSchemas\XBRL 2.1 Updated\us-gaap-ci-2004-06-15-presentation.xml", presRef);
#endif
        }
Exemple #17
0
        [Test] public void GAAP_Parse()
        {
            TestSchema s = new TestSchema();

            ErrorInfo ei = null;

            if (s.Load(US_GAAP_FILE, out ei) != true)
            {
                Assert.IsNotNull(ei);
                Assert.Fail(ei.ExceptionMsg);
            }

            int errors = 0;

            s.Parse(out ei, out errors);
            if (ei != null)
            {
                Assert.Fail(ei.ExceptionMsg);
            }

            Assert.AreEqual(27, errors);
        }
Exemple #18
0
        public void PT_ReadElements()
        {
            TestSchema s = new TestSchema();

            ErrorInfo ei = null;

            Assert.AreEqual( true, s.Load( PT_GAAP_FILE, out ei ), "Could not load PT GAAP File" );
            Assert.IsNull( ei );

            int errors = 0;
            Presentation p = s.LoadPresentationSchema( out errors );
            Assert.AreEqual( 4, errors, "load presentation failed" );

            s.presentationInfo = p.PresentationLinks;

            s.LoadElements( out errors );
            Assert.AreEqual( 1052, errors, "load elements failed" );
        }
Exemple #19
0
        public void PT_TargetNamespace()
        {
            TestSchema s = new TestSchema();

            ErrorInfo ei = null;

            Assert.AreEqual( true, s.Load( PT_GAAP_FILE, out ei ), "Could not load PT GAAP File" );
            Assert.IsNull( ei );

            s.GetTargetNamespace();

            Assert.AreEqual( "http://www.xbrl.org/taxonomy/us/fr/common/pt/usfr-pt-2004-06-15", s.targetNamespace );
        }
Exemple #20
0
        public void PT_VerifyPresentationTypes()
        {
            TestSchema s = new TestSchema();

            ErrorInfo ei = null;

            if ( s.Load( PT_GAAP_FILE, out ei ) != true )
            {
                Assert.IsNotNull( ei );
                Assert.Fail( ei.ExceptionMsg );
            }

            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" );
            }
        }
Exemple #21
0
        public void SAG_GetLinkbaseRef_Presentation()
        {
            TestSchema s = new TestSchema();

            ErrorInfo ei = null;

            Assert.AreEqual( true, s.Load( SAG_FILE, out ei ), "Could not load SAG File" );
            Assert.IsNull( ei );

            string labelRef = s.GetLinkbaseReference( TestSchema.TARGET_LINKBASE_URI + TestSchema.PRESENTATION_ROLE );

            Assert.AreEqual( "blue", labelRef );
        }
Exemple #22
0
        public void SAG_LoadSchema()
        {
            TestSchema s = new TestSchema();
            ErrorInfo ei = null;

            Assert.AreEqual( true, s.Load( SAG_FILE, out ei ), "Could not load SoftwareAG file" );
            Assert.IsNull( ei );
        }
Exemple #23
0
        public void GAAP_TargetNamespace()
        {
            TestSchema s = new TestSchema();

            ErrorInfo ei = null;

            Assert.AreEqual( true, s.Load( US_GAAP_FILE, out ei ), "Could not load US GAAP File" );
            Assert.IsNull( ei );

            s.GetTargetNamespace();

            Assert.AreEqual( "http://www.xbrl.org/taxonomy/us/fr/gaap/ci/us-gaap-ci-2004-06-15", s.targetNamespace );
        }
Exemple #24
0
        public void SAG_TargetNamespace()
        {
            TestSchema s = new TestSchema();

            ErrorInfo ei = null;

            Assert.AreEqual( true, s.Load( SAG_FILE, out ei ), "Could not load SoftwareAge File" );
            Assert.IsNull( ei );

            s.GetTargetNamespace();

            Assert.IsNull( ei );
            Assert.IsNull( s.targetNamespace );
        }
Exemple #25
0
        public void GAAP_LoadSchema()
        {
            TestSchema s = new TestSchema();

            ErrorInfo ei = null;

            Assert.AreEqual( true, s.Load( US_GAAP_FILE, out ei ), "Could not load US GAAP File" );
            Assert.IsNull( ei );
        }
Exemple #26
0
        public void GAAP_VerifyPresentationTypes()
        {
            TestSchema s = new TestSchema();

            ErrorInfo ei = null;

            if ( s.Load( US_GAAP_FILE, out ei ) != true )
            {
                Assert.IsNotNull( ei );
                Assert.Fail( ei.ExceptionMsg );
            }

            int errors = 0;

            s.TestParse( out errors );
            Assert.AreEqual( 27, errors, "parse failed" );

            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" );
            }
        }
Exemple #27
0
        public void GAAP_Parse()
        {
            TestSchema s = new TestSchema();

            ErrorInfo ei = null;

            if ( s.Load( US_GAAP_FILE, out ei ) != true )
            {
                Assert.IsNotNull( ei );
                Assert.Fail( ei.ExceptionMsg );
            }

            int errors = 0;
            s.Parse( out ei, out errors );
            if ( ei != null )
            {
                Assert.Fail( ei.ExceptionMsg );
            }

            Assert.AreEqual( 27, errors );
        }
Exemple #28
0
        public void Test_LoadRoleTypes()
        {
            TestSchema s = new TestSchema();

            ErrorInfo ei = null;

            if ( !s.Load( US_GAAP_FILE, out ei ) )
            {
                Assert.IsNotNull( ei );
                Assert.Fail( ei.ExceptionMsg );
            }

            Assert.IsNull( ei );

            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] );
        }
Exemple #29
0
        [Test] public void Test_LoadRoleTypes()
        {
            TestSchema s = new TestSchema();

            ErrorInfo ei = null;

            if (!s.Load(US_GAAP_FILE, out ei))
            {
                Assert.IsNotNull(ei);
                Assert.Fail(ei.ExceptionMsg);
            }

            Assert.IsNull(ei);

            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]);
        }
Exemple #30
0
        public void GAAP_ReadElements()
        {
            TestSchema s = new TestSchema();

            ErrorInfo ei = null;

            if ( s.Load( US_GAAP_FILE, out ei ) == false )
            {
                Assert.Fail( ei.ExceptionMsg );
            }

            if ( ei != null )
            {
                Assert.Fail( ei.ExceptionMsg );
            }
            //			int errors = 0;
            //			int numElements = s.LoadElements( out errors );
            //			Assert.AreEqual( 0, errors );
            ////			Assert.AreEqual( 5, numElements, "No Elements Found" );
            //			Assert.AreEqual( 5, s.elements.Count );
            //
            //			Assert.IsTrue( s.elements.ContainsKey( "Name" ) );
            //			Assert.IsTrue( s.elements.ContainsKey( "Number" ) );
            //			Assert.IsTrue( s.elements.ContainsKey( "Chapter" ) );
            //			Assert.IsTrue( s.elements.ContainsKey( "Paragraph" ) );
            //			Assert.IsTrue( s.elements.ContainsKey( "Subparagraph" ) );
        }