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

            s.CurrentLabelRole = "label";
            s.CurrentLanguage  = "en";

            s.Load(US_GAAP_FILE);

            int errors = 0;

            s.Parse(out errors);

            ArrayList nodeList = s.GetNodesByElement();

            Assert.IsNotNull(nodeList);
            Assert.AreEqual(1445, nodeList.Count);

            Console.WriteLine("Found Tuple Nodes: ");

            foreach (Node n in nodeList)
            {
                RecurseVerifyTuples(n);
            }
        }
Example #3
0
        [Test][Ignore("Just used to view nodes")] public void GAAP_Test_GetNodesByElement()
        {
            TestTaxonomy_2004_07_06 s = new TestTaxonomy_2004_07_06();

            s.CurrentLabelRole = "label";
            s.CurrentLanguage  = "en";

            s.Load(US_GAAP_FILE);

            int errors = 0;

            s.Parse(out errors);

            ArrayList nodeList = s.GetNodesByElement();

            Assert.IsNotNull(nodeList);
            Assert.AreEqual(1367, nodeList.Count);

            Console.WriteLine("Nodes By Element: ");

            foreach (Node n in nodeList)
            {
                Console.WriteLine(TestNode.ToXml(0, n));
            }
        }
        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_Test_VerifyTuples()
        {
            TestTaxonomy_2004_07_06 s = new TestTaxonomy_2004_07_06();

            s.CurrentLabelRole = "label";
            s.CurrentLanguage = "en";

            s.Load( US_GAAP_FILE);

            int errors = 0;

            s.Parse( out errors );

            ArrayList nodeList = s.GetNodesByElement();

            Assert.IsNotNull( nodeList );
            Assert.AreEqual( 1445, nodeList.Count );

            Console.WriteLine( "Found Tuple Nodes: " );

            foreach (Node n in nodeList )
            {
                RecurseVerifyTuples( n );
            }
        }
        public void GAAP_Test_GetNodesByElement()
        {
            TestTaxonomy_2004_07_06 s = new TestTaxonomy_2004_07_06();

            s.CurrentLabelRole = "label";
            s.CurrentLanguage = "en";

            s.Load( US_GAAP_FILE);

            int errors = 0;

            s.Parse( out errors );

            ArrayList nodeList = s.GetNodesByElement();

            Assert.IsNotNull( nodeList );
            Assert.AreEqual( 1367, nodeList.Count );

            Console.WriteLine( "Nodes By Element: " );

            foreach (Node n in nodeList )
            {
                Console.WriteLine( TestNode.ToXml( 0, n ) );
            }
        }