Beispiel #1
0
        public void GAAP_VerifyElementTuplesHaveChildren()
        {
            TestTaxonomy_2004_08_15 s = new TestTaxonomy_2004_08_15();
            int errors = 0;

            s.Load(US_GAAP_FILE);

            s.Parse(out errors);

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

            ArrayList nodes = s.GetNodesByElement();

            Assert.IsNotNull(nodes, "No nodes returned");

            foreach (Node n in nodes)
            {
                if (n.IsTuple)
                {
                    Assert.IsNotNull(n.Children, "children arraylist is null");
                    Assert.IsTrue(n.Children.Count > 0, "Tuple doesn't have children");
                    Assert.AreEqual(0.0, n.Order, "order not zero");
                }
            }
        }
Beispiel #2
0
        public void GAAP_Test_VerifyTuples()
        {
            TestTaxonomy_2004_08_15 s = new TestTaxonomy_2004_08_15();

            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(1331, nodeList.Count);

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

            foreach (Node n in nodeList)
            {
                RecurseVerifyTuples(n);
            }
        }
Beispiel #3
0
        public void GAAP_Test_GetNodesByElement()
        {
            TestTaxonomy_2004_08_15 s = new TestTaxonomy_2004_08_15();

            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));
            }
        }
Beispiel #4
0
        public void GAAP_ElementTaxonomyLinks()
        {
            TestTaxonomy_2004_08_15 s = new TestTaxonomy_2004_08_15();
            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/us/fr/common/pt/2004-08-15", ti.WebLocation, "target namespace wrong");

            Assert.AreEqual(@"S:\TestSchemas\XBRL 2.1 Updated\2004-08-15\usfr-pt-2004-08-15.xsd", ti.Location, "targetLocation wrong");
        }
        public void GAAP_VerifyElementTuplesHaveChildren()
        {
            TestTaxonomy_2004_08_15 s = new TestTaxonomy_2004_08_15();
            int errors = 0;

            s.Load( US_GAAP_FILE);

            s.Parse( out errors );

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

            ArrayList nodes = s.GetNodesByElement();

            Assert.IsNotNull( nodes, "No nodes returned" );

            foreach ( Node n in nodes )
            {
                if ( n.IsTuple )
                {
                    Assert.IsNotNull( n.Children, "children arraylist is null" );
                    Assert.IsTrue( n.Children.Count > 0, "Tuple doesn't have children" );
                    Assert.AreEqual( 0.0, n.Order, "order not zero" );
                }
            }
        }
        public void GAAP_Test_VerifyTuples()
        {
            TestTaxonomy_2004_08_15 s = new TestTaxonomy_2004_08_15();

            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( 1331, nodeList.Count );

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

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

            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()
        {
            TestTaxonomy_2004_08_15 s = new TestTaxonomy_2004_08_15();
            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/us/fr/common/pt/2004-08-15", ti.WebLocation, "target namespace wrong" );

            Assert.AreEqual(@"S:\TestSchemas\XBRL 2.1 Updated\2004-08-15\usfr-pt-2004-08-15.xsd", ti.Location, "targetLocation wrong");
        }