Beispiel #1
0
        [Test] public void GAAP_ElementTaxonomyLinks()
        {
            //Trace.Listeners.Add( new TextWriterTraceListener(Console.Out) );

            TestTaxonomy_2004_07_06 s = new TestTaxonomy_2004_07_06();

            int errors = 0;

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

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

            s.currentLanguage  = "en";
            s.currentLabelRole = "terseLabel";

            ArrayList nodes = s.GetNodesByElement();

            Assert.AreEqual(1, ((Node)nodes[0]).TaxonomyInfoId, "Taxonomy id not correct");

            TaxonomyItem ti = s.GetTaxonomyInfo((Node)nodes[0]);

            Assert.AreEqual("http://www.xbrl.org/taxonomy/us/fr/common/pt/usfr-pt-2004-07-06", ti.WebLocation, "target namespace wrong");

            Assert.AreEqual(PT_GAAP_FILE, ti.Location, "targetLocation wrong");
        }
        public void GAAP_ElementTaxonomyLinks()
        {
            //Trace.Listeners.Add( new TextWriterTraceListener(Console.Out) );

            TestTaxonomy_2004_07_06 s = new TestTaxonomy_2004_07_06();

            int errors = 0;

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

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

            s.currentLanguage = "en";
            s.currentLabelRole = "terseLabel";

            ArrayList nodes = s.GetNodesByElement();

            Assert.AreEqual( 1, ((Node)nodes[0]).TaxonomyInfoId, "Taxonomy id not correct" );

            TaxonomyItem ti = s.GetTaxonomyInfo( (Node)nodes[0] );

            Assert.AreEqual( "http://www.xbrl.org/taxonomy/us/fr/common/pt/usfr-pt-2004-07-06", ti.WebLocation, "target namespace wrong" );

            Assert.AreEqual( PT_GAAP_FILE, ti.Location, "targetLocation wrong" );
        }