예제 #1
0
        public void BASI_LabelTest()
        {
            TestTaxonomy_2005_02_28 s = new TestTaxonomy_2005_02_28();
            int errors = 0;

            DateTime start = DateTime.Now;

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

            errors = 0;
            s.Parse(out errors);

            if (errors > 0)
            {
                SendErrorsToConsole(s.errorList);
            }

            s.BindPresentationCalculationElements(true, out errors);
            s.BindElements(new BindElementDelegate(s.BindLabelToElement), out errors);

            PresentationLink pl = s.presentationInfo["http://www.xbrl.org/us/fr/lr/role/TupleContentModelsCommonTerms"] as PresentationLink;

            Assert.IsNotNull(pl, "can't get http://www.xbrl.org/us/fr/lr/role/TupleContentModelsCommonTerms");

            Node parentNode = pl.CreateNode("en", "label");

            System.Text.StringBuilder sb = TestTaxonomy_EDGAROnline.DisplayNode(parentNode, 0);
            Console.WriteLine(sb.ToString());

            // test the fourth child
            Node n = (Node)parentNode.Children[13];

            Assert.AreEqual(n.Label, "Contingencies - Possible Loss", "label wrong");
        }
예제 #2
0
        public void BASI_LabelTest()
        {
            TestTaxonomy_2005_02_28 s = new TestTaxonomy_2005_02_28();
            int errors = 0;

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

            errors = 0;
            s.Parse( out errors );

            if ( errors > 0 )
            {
                SendErrorsToConsole( s.errorList );
            }

            s.BindPresentationCalculationElements( true, out errors );
            s.BindElements( new BindElementDelegate( s.BindLabelToElement ), out errors );

            PresentationLink pl = s.presentationInfo[ "http://www.xbrl.org/us/fr/lr/role/TupleContentModelsCommonTerms" ] as PresentationLink;

            Assert.IsNotNull( pl, "can't get http://www.xbrl.org/us/fr/lr/role/TupleContentModelsCommonTerms" );

            Node parentNode = pl.CreateNode( "en", "label" );
            System.Text.StringBuilder sb = TestTaxonomy_EDGAROnline.DisplayNode(parentNode, 0);
            Console.WriteLine(sb.ToString());

            // test the fourth child
            Node n = (Node)parentNode.Children[13];

            Assert.AreEqual( n.Label, "Contingencies - Possible Loss", "label wrong" );
        }