예제 #1
0
        public void Test_VerifyRoleRefs_07_06()
        {
            TestPresentation tp = new TestPresentation();

            tp.ProcessingPresenationType = PreseantationTypeCode.Presentation;

            int errors = 0;

            if (tp.Load(GAAP_PRESENTATION_FILE_07_06, out errors) == false)
            {
                Assert.Fail((string)tp.ErrorList[0]);
            }

            int numErrors = 0;

            tp.LoadRoleRefs(out numErrors);

            Assert.AreEqual(0, numErrors);
            Assert.IsNotNull(tp.roleRefs);
            Assert.AreEqual(6, tp.roleRefs.Count);

            Assert.IsTrue(tp.VerifyRoleReference("us-gaap-ci-2004-07-06.xsd", "http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementFinancialPosition"));
            Assert.IsFalse(tp.VerifyRoleReference("aaa", "http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementFinancialPosition"));
            Assert.IsFalse(tp.VerifyRoleReference("us-gaap-ci-2004-07-06.xsd", "bbb"));
        }
예제 #2
0
        public void LoadCalculationLinks_07_06()
        {
            TestPresentation tp = new TestPresentation();
            tp.ProcessingPresenationType = PreseantationTypeCode.Calculation;

            DateTime start = DateTime.Now;
            Console.WriteLine( "Reading file: {0}", GAAP_CI_CALCULATION_FILE_07_06 );

            int errors = 0;
            if ( tp.Load( GAAP_CI_CALCULATION_FILE_07_06, out errors ) == false )
            {
                Assert.Fail( (string)tp.ErrorList[0] );
            }

            Assert.AreEqual( "http://www.xbrl.org/2003/linkbase", tp.theManager.DefaultNamespace );

            errors = 0;
            int nodes = tp.LoadLinks( out errors );

            Assert.AreEqual( 0, errors );
            Assert.AreEqual( 6, nodes, "Wrong number of calculation nodes loaded" );

            DateTime end = DateTime.Now;

            Console.WriteLine( "Processing complete. Time elapsed: {0}", (end-start).ToString() );
            //Console.WriteLine( tp.ToXmlString() );
        }
예제 #3
0
        public void Output_USFR_PT_Presentation_07_06()
        {
            TestPresentation tp = new TestPresentation();

            tp.ProcessingPresenationType = PreseantationTypeCode.Presentation;

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

            Console.WriteLine("Reading file: {0}", PT_PRESENTATION_FILE_07_06);

            if (tp.Load(PT_PRESENTATION_FILE_07_06, out errors) == false)
            {
                Assert.Fail((string)tp.ErrorList[0]);
            }

            Assert.AreEqual("http://www.xbrl.org/2003/linkbase", tp.theManager.DefaultNamespace);

            errors = 0;
            int nodes = tp.LoadLinks(out errors);

            Assert.AreEqual(4, errors);
            Assert.AreEqual(3, nodes, "Wrong number of nodes loaded");

            DateTime end = DateTime.Now;

            Console.WriteLine("Processing complete. Time elapsed: {0}", (end - start).ToString());

            using (StreamWriter sw = new StreamWriter(PT_OUT_FILE))
            {
                sw.Write(tp.ToXmlString());
            }
        }
예제 #4
0
        public void LoadCalculationRoleRefs_07_06()
        {
            TestPresentation tp = new TestPresentation();

            tp.ProcessingPresenationType = PreseantationTypeCode.Calculation;

            int errors = 0;

            if (tp.Load(GAAP_CI_CALCULATION_FILE_07_06, out errors) == false)
            {
                Assert.Fail((string)tp.ErrorList[0]);
            }

            int numErrors = 0;

            tp.LoadRoleRefs(out numErrors);

            Assert.AreEqual(0, numErrors);
            Assert.IsNotNull(tp.roleRefs);
            Assert.AreEqual(6, tp.roleRefs.Count);

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

            RoleRef     rr = tp.roleRefs["http://www.xbrl.org/taxonomy/us/fr/gaap/role/TotalStockholdersEquityCalculation"] as RoleRef;
            TestRoleRef rt = new TestRoleRef(rr);

            Assert.IsNotNull(rt);
        }
예제 #5
0
        public void LoadCalculationLinks_07_06()
        {
            TestPresentation tp = new TestPresentation();

            tp.ProcessingPresenationType = PreseantationTypeCode.Calculation;

            DateTime start = DateTime.Now;

            Console.WriteLine("Reading file: {0}", GAAP_CI_CALCULATION_FILE_07_06);

            int errors = 0;

            if (tp.Load(GAAP_CI_CALCULATION_FILE_07_06, out errors) == false)
            {
                Assert.Fail((string)tp.ErrorList[0]);
            }

            Assert.AreEqual("http://www.xbrl.org/2003/linkbase", tp.theManager.DefaultNamespace);

            errors = 0;
            int nodes = tp.LoadLinks(out errors);

            Assert.AreEqual(0, errors);
            Assert.AreEqual(6, nodes, "Wrong number of calculation nodes loaded");



            DateTime end = DateTime.Now;

            Console.WriteLine("Processing complete. Time elapsed: {0}", (end - start).ToString());
            //Console.WriteLine( tp.ToXmlString() );
        }
예제 #6
0
        public void LoadLocators()
        {
            TestPresentationLink pl = new TestPresentationLink("Statement of Financial Position - CI","http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementFinancialPosition");

            int errors = 0;

            TestPresentation p = new TestPresentation();

            Console.WriteLine( "Using File {0}", GAAP_PRESENTATION_FILE );

            p.Load( GAAP_PRESENTATION_FILE);

            XmlNodeList pLinksList = p.TheDocument.SelectNodes( Presentation.PLINK_KEY, p.TheManager );

            if ( pLinksList == null || pLinksList.Count == 0 )
            {
                Assert.Fail( "no nodes returned" );
            }

            XmlNode plNode = pLinksList.Item(0);
            pl.LoadChildren( plNode, p.TheManager, out errors );

            Assert.AreEqual( 0, errors );
            Assert.AreEqual( 290, pl.locators.Count );

            //total count of prohibited mappings
            int count = 0;
            foreach ( PresentationLocator ploc in pl.locators.Values )
            {
                TestPresentationLocator tpl = new TestPresentationLocator( ploc );
                count += tpl.NumProhibited();
            }

            Assert.AreEqual( 8, count );
        }
예제 #7
0
        /// <exclude/>
        [Test] public void VerifyXmlString()
        {
            TestPresentationLink pl = new TestPresentationLink("Statement of Financial Position - CI", "http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementFinancialPosition");

            int errors = 0;

            TestPresentation p = new TestPresentation();

            Console.WriteLine("Using File {0}", GAAP_PRESENTATION_FILE);

            p.Load(GAAP_PRESENTATION_FILE);

            XmlNodeList pLinksList = p.TheDocument.SelectNodes(Presentation.PLINK_KEY, p.TheManager);

            if (pLinksList == null || pLinksList.Count == 0)
            {
                Assert.Fail("no nodes returned");
            }

            XmlNode plNode = pLinksList.Item(0);

            pl.LoadChildren(plNode, p.TheManager, out errors);

            Assert.AreEqual(0, errors);

            string xml = pl.ToXmlString();

            //Console.WriteLine( xml );

            XmlDocument doc = new XmlDocument();

            //XmlDocumentFragment frag = doc.CreateDocumentFragment();
            doc.LoadXml(xml);
        }
예제 #8
0
        public void LoadPresentation_06_15()
        {
            TestPresentation tp = new TestPresentation();

            tp.ProcessingPresenationType = PreseantationTypeCode.Presentation;

            int errors = 0;

            if (tp.Load(GAAP_PRESENTATION_FILE_06_15, out errors) == false)
            {
                Assert.Fail((string)tp.ErrorList[0]);
            }
        }
예제 #9
0
        public void LoadCalculation_07_06()
        {
            TestPresentation tp = new TestPresentation();

            tp.ProcessingPresenationType = PreseantationTypeCode.Calculation;

            int errors = 0;

            if (tp.Load(GAAP_CI_CALCULATION_FILE_07_06, out errors) == false)
            {
                Assert.Fail((string)tp.ErrorList[0]);
            }
        }
예제 #10
0
        public void LoadLocators()
        {
            TestPresentationLink pl = new TestPresentationLink("Statement of Financial Position - CI", "http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementFinancialPosition");

            int errors = 0;

            TestPresentation p = new TestPresentation();

            Console.WriteLine("Using File {0}", GAAP_PRESENTATION_FILE);

            p.Load(GAAP_PRESENTATION_FILE);

            XmlNodeList pLinksList = p.TheDocument.SelectNodes(Presentation.PLINK_KEY, p.TheManager);

            if (pLinksList == null || pLinksList.Count == 0)
            {
                Assert.Fail("no nodes returned");
            }

            XmlNode plNode = pLinksList.Item(0);

            pl.LoadChildren(plNode, p.TheManager, out errors);

            Assert.AreEqual(0, errors);
            Assert.AreEqual(290, pl.locators.Count);

            //total count of prohibited mappings
            int count = 0;

            foreach (PresentationLocator ploc in pl.locators.Values)
            {
                TestPresentationLocator tpl = new TestPresentationLocator(ploc);
                count += tpl.NumProhibited();
            }


            Assert.AreEqual(8, count);
        }
예제 #11
0
        public void VerifyXmlString()
        {
            TestPresentationLink pl = new TestPresentationLink("Statement of Financial Position - CI","http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementFinancialPosition");

            int errors = 0;

            TestPresentation p = new TestPresentation();

            Console.WriteLine( "Using File {0}", GAAP_PRESENTATION_FILE );

            p.Load( GAAP_PRESENTATION_FILE);

            XmlNodeList pLinksList = p.TheDocument.SelectNodes( Presentation.PLINK_KEY, p.TheManager );

            if ( pLinksList == null || pLinksList.Count == 0 )
            {
                Assert.Fail( "no nodes returned" );
            }

            XmlNode plNode = pLinksList.Item(0);
            pl.LoadChildren( plNode, p.TheManager, out errors );

            Assert.AreEqual( 0, errors );

            string xml = pl.ToXmlString();

            //Console.WriteLine( xml );

            XmlDocument doc = new XmlDocument();
            //XmlDocumentFragment frag = doc.CreateDocumentFragment();
            doc.LoadXml( xml );
        }
예제 #12
0
        public void LoadPresentation_07_06()
        {
            TestPresentation tp = new TestPresentation();
            tp.ProcessingPresenationType = PreseantationTypeCode.Presentation;

            int errors = 0;
            if ( tp.Load( GAAP_PRESENTATION_FILE_07_06, out errors ) == false )
            {
                Assert.Fail( (string)tp.ErrorList[0] );
            }
        }
예제 #13
0
        public void Output_USFR_PT_Presentation_07_06()
        {
            TestPresentation tp = new TestPresentation();
            tp.ProcessingPresenationType = PreseantationTypeCode.Presentation;

            DateTime start = DateTime.Now;
            int errors = 0;
            Console.WriteLine( "Reading file: {0}", PT_PRESENTATION_FILE_07_06 );

            if ( tp.Load( PT_PRESENTATION_FILE_07_06, out errors ) == false )
            {
                Assert.Fail( (string)tp.ErrorList[0] );
            }

            Assert.AreEqual( "http://www.xbrl.org/2003/linkbase", tp.theManager.DefaultNamespace );

            errors = 0;
            int nodes = tp.LoadLinks( out errors );

            Assert.AreEqual( 4, errors );
            Assert.AreEqual( 3, nodes, "Wrong number of nodes loaded" );

            DateTime end = DateTime.Now;

            Console.WriteLine( "Processing complete. Time elapsed: {0}", (end-start).ToString() );

            using ( StreamWriter sw = new StreamWriter( PT_OUT_FILE ) )
            {
                sw.Write( tp.ToXmlString() );
            }
        }
예제 #14
0
        public void Test_RoleRefs_06_15()
        {
            TestPresentation tp = new TestPresentation();
            tp.ProcessingPresenationType = PreseantationTypeCode.Presentation;

            int errors = 0;
            if ( tp.Load( GAAP_PRESENTATION_FILE_06_15, out errors ) == false )
            {
                Assert.Fail( (string)tp.ErrorList[0]);
            }

            int numErrors = 0;
            tp.LoadRoleRefs( out numErrors );

            Assert.AreEqual( 0, numErrors );
            Assert.IsNotNull( tp.roleRefs );
            Assert.AreEqual( 5, tp.roleRefs.Count );

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

            RoleRef rr = tp.roleRefs["http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementStockholdersEquity"] as RoleRef;
            TestRoleRef rt = new TestRoleRef( rr );

            Assert.IsNotNull( rt );

            Assert.AreEqual( "http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementStockholdersEquity", rt.Uri );
            Assert.AreEqual( "us-gaap-ci-2004-06-15.xsd#StatementStockholdersEquity", rt.Href );
            Assert.AreEqual( "StatementStockholdersEquity", rt.GetId() );
            Assert.AreEqual( "us-gaap-ci-2004-06-15.xsd", rt.GetSchemaName() );

            //http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementCashFlowsDirect
            rr = tp.roleRefs["http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementCashFlowsDirect"] as RoleRef;
            rt = new TestRoleRef( rr );

            Assert.IsNotNull( rt );

            Assert.AreEqual( "http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementCashFlowsDirect", rt.Uri );
            Assert.AreEqual( "us-gaap-ci-2004-06-15.xsd#StatementCashFlowsDirect", rt.Href );
            Assert.AreEqual( "StatementCashFlowsDirect", rt.GetId() );
            Assert.AreEqual( "us-gaap-ci-2004-06-15.xsd", rt.GetSchemaName() );

            //http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementCashFlowsIndirect
            rr = tp.roleRefs["http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementCashFlowsIndirect"] as RoleRef;
            rt = new TestRoleRef( rr );

            Assert.IsNotNull( rt );

            Assert.AreEqual( "http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementCashFlowsIndirect", rt.Uri );
            Assert.AreEqual( "us-gaap-ci-2004-06-15.xsd#StatementCashFlowsIndirect", rt.Href );
            Assert.AreEqual( "StatementCashFlowsIndirect", rt.GetId() );
            Assert.AreEqual( "us-gaap-ci-2004-06-15.xsd", rt.GetSchemaName() );

            //http://www.xbrl.org/taxonomy/us/fr/gaap/role/IncomeStatement
            rr = tp.roleRefs["http://www.xbrl.org/taxonomy/us/fr/gaap/role/IncomeStatement"] as RoleRef;
            rt = new TestRoleRef( rr );

            Assert.IsNotNull( rt );

            Assert.AreEqual( "http://www.xbrl.org/taxonomy/us/fr/gaap/role/IncomeStatement", rt.Uri );
            Assert.AreEqual( "us-gaap-ci-2004-06-15.xsd#IncomeStatement", rt.Href );
            Assert.AreEqual( "IncomeStatement", rt.GetId() );
            Assert.AreEqual( "us-gaap-ci-2004-06-15.xsd", rt.GetSchemaName() );

            //http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementFinancialPosition
            rr = tp.roleRefs["http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementFinancialPosition"] as RoleRef;
            rt = new TestRoleRef( rr );

            Assert.IsNotNull( rt );

            Assert.AreEqual( "http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementFinancialPosition", rt.Uri );
            Assert.AreEqual( "us-gaap-ci-2004-06-15.xsd#StatementFinancialPosition", rt.Href );
            Assert.AreEqual( "StatementFinancialPosition", rt.GetId() );
            Assert.AreEqual( "us-gaap-ci-2004-06-15.xsd", rt.GetSchemaName() );
        }
예제 #15
0
        public void Test_VerifyRoleRefs_07_06()
        {
            TestPresentation tp = new TestPresentation();
            tp.ProcessingPresenationType = PreseantationTypeCode.Presentation;

            int errors = 0;
            if ( tp.Load( GAAP_PRESENTATION_FILE_07_06, out errors ) == false )
            {
                Assert.Fail( (string)tp.ErrorList[0] );
            }

            int numErrors = 0;
            tp.LoadRoleRefs( out numErrors );

            Assert.AreEqual( 0, numErrors );
            Assert.IsNotNull( tp.roleRefs );
            Assert.AreEqual( 6, tp.roleRefs.Count );

            Assert.IsTrue(  tp.VerifyRoleReference( "us-gaap-ci-2004-07-06.xsd", "http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementFinancialPosition" ) );
            Assert.IsFalse( tp.VerifyRoleReference( "aaa", "http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementFinancialPosition" ) );
            Assert.IsFalse( tp.VerifyRoleReference( "us-gaap-ci-2004-07-06.xsd", "bbb" ) );
        }
예제 #16
0
        public void Test_Presentation_RoleRefs_07_06()
        {
            TestPresentation tp = new TestPresentation();

            tp.ProcessingPresenationType = PreseantationTypeCode.Presentation;

            int errors = 0;

            if (tp.Load(GAAP_PRESENTATION_FILE_07_06, out errors) == false)
            {
                Assert.Fail((string)tp.ErrorList[0]);
            }

            int numErrors = 0;

            tp.LoadRoleRefs(out numErrors);

            Assert.AreEqual(0, numErrors);
            Assert.IsNotNull(tp.roleRefs);
            Assert.AreEqual(6, tp.roleRefs.Count);

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

            RoleRef     rr = tp.roleRefs["http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementStockholdersEquity"] as RoleRef;
            TestRoleRef rt = new TestRoleRef(rr);

            Assert.IsNotNull(rt);

            Assert.AreEqual("http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementStockholdersEquity", rt.Uri);
            Assert.AreEqual("us-gaap-ci-2004-07-06.xsd#StatementStockholdersEquity", rt.Href);
            Assert.AreEqual("StatementStockholdersEquity", rt.GetId());
            Assert.AreEqual("us-gaap-ci-2004-07-06.xsd", rt.GetSchemaName());

            //http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementCashFlowsDirect
            rr = tp.roleRefs["http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementCashFlowsDirect"] as RoleRef;
            rt = new TestRoleRef(rr);

            Assert.IsNotNull(rt);

            Assert.AreEqual("http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementCashFlowsDirect", rt.Uri);
            Assert.AreEqual("us-gaap-ci-2004-07-06.xsd#StatementCashFlowsDirect", rt.Href);
            Assert.AreEqual("StatementCashFlowsDirect", rt.GetId());
            Assert.AreEqual("us-gaap-ci-2004-07-06.xsd", rt.GetSchemaName());

            //http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementCashFlowsIndirect
            rr = tp.roleRefs["http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementCashFlowsIndirect"] as RoleRef;
            rt = new TestRoleRef(rr);

            Assert.IsNotNull(rt);

            Assert.AreEqual("http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementCashFlowsIndirect", rt.Uri);
            Assert.AreEqual("us-gaap-ci-2004-07-06.xsd#StatementCashFlowsIndirect", rt.Href);
            Assert.AreEqual("StatementCashFlowsIndirect", rt.GetId());
            Assert.AreEqual("us-gaap-ci-2004-07-06.xsd", rt.GetSchemaName());

            //http://www.xbrl.org/taxonomy/us/fr/gaap/role/IncomeStatement
            rr = tp.roleRefs["http://www.xbrl.org/taxonomy/us/fr/gaap/role/IncomeStatement"] as RoleRef;
            rt = new TestRoleRef(rr);

            Assert.IsNotNull(rt);

            Assert.AreEqual("http://www.xbrl.org/taxonomy/us/fr/gaap/role/IncomeStatement", rt.Uri);
            Assert.AreEqual("us-gaap-ci-2004-07-06.xsd#IncomeStatement", rt.Href);
            Assert.AreEqual("IncomeStatement", rt.GetId());
            Assert.AreEqual("us-gaap-ci-2004-07-06.xsd", rt.GetSchemaName());

            //http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementFinancialPosition
            rr = tp.roleRefs["http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementFinancialPosition"] as RoleRef;
            rt = new TestRoleRef(rr);

            Assert.IsNotNull(rt);

            Assert.AreEqual("http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementFinancialPosition", rt.Uri);
            Assert.AreEqual("us-gaap-ci-2004-07-06.xsd#StatementFinancialPosition", rt.Href);
            Assert.AreEqual("StatementFinancialPosition", rt.GetId());
            Assert.AreEqual("us-gaap-ci-2004-07-06.xsd", rt.GetSchemaName());
        }
예제 #17
0
        public void LoadCalculationRoleRefs_07_06()
        {
            TestPresentation tp = new TestPresentation();
            tp.ProcessingPresenationType = PreseantationTypeCode.Calculation;

            int errors = 0;
            if ( tp.Load( GAAP_CI_CALCULATION_FILE_07_06, out errors ) == false )
            {
                Assert.Fail( (string)tp.ErrorList[0]);
            }

            int numErrors = 0;
            tp.LoadRoleRefs( out numErrors );

            Assert.AreEqual( 0, numErrors );
            Assert.IsNotNull( tp.roleRefs );
            Assert.AreEqual( 6, tp.roleRefs.Count );

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

            RoleRef rr = tp.roleRefs["http://www.xbrl.org/taxonomy/us/fr/gaap/role/TotalStockholdersEquityCalculation"] as RoleRef;
            TestRoleRef rt = new TestRoleRef( rr );

            Assert.IsNotNull( rt );
        }