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

            TestTaxonomy_IFRS_2004_06_15 s = new TestTaxonomy_IFRS_2004_06_15();

            int errors = 0;

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

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

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

            ArrayList nodes = s.GetNodesByElement();

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

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

            Assert.AreEqual("http://xbrl.iasb.org/int/fr/ifrs/gp/2004-06-15", ti.WebLocation, "target namespace wrong");

            Assert.AreEqual(IFRS_FILE, ti.Location, "targetLocation wrong");
        }
Exemple #2
0
        [Test][Ignore("display only")] public void IFRS_Test_VerifyTuples()
        {
            TestTaxonomy_IFRS_2004_06_15 s = new TestTaxonomy_IFRS_2004_06_15();

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

            s.Load(IFRS_FILE);

            int errors = 0;

            s.Parse(out errors);

            ArrayList nodeList = s.GetNodesByElement();

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

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

            foreach (Node n in nodeList)
            {
                RecurseVerifyTuples(n);
            }
        }
Exemple #3
0
        [Test][Ignore("Display only")] public void IFRS_Test_GetNodesByElement()
        {
            TestTaxonomy_IFRS_2004_06_15 s = new TestTaxonomy_IFRS_2004_06_15();

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

            s.Load(IFRS_FILE);

            int errors = 0;

            s.Parse(out errors);

            ArrayList nodeList = s.GetNodesByElement();

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

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

            foreach (Node n in nodeList)
            {
                Console.WriteLine(TestNode.ToXml(0, n));
            }
        }
        public void IFRS_Test_VerifyTuples()
        {
            TestTaxonomy_IFRS_2004_06_15 s = new TestTaxonomy_IFRS_2004_06_15();

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

            s.Load( IFRS_FILE);

            int errors = 0;

            s.Parse( out errors );

            ArrayList nodeList = s.GetNodesByElement();

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

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

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

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

            s.Load( IFRS_FILE);

            int errors = 0;

            s.Parse( out errors );

            ArrayList nodeList = s.GetNodesByElement();

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

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

            foreach (Node n in nodeList )
            {
                Console.WriteLine( TestNode.ToXml( 0, n ) );
            }
        }
        public void IFRS_ElementTaxonomyLinks()
        {
            //Trace.Listeners.Add( new TextWriterTraceListener(Console.Out) );

            TestTaxonomy_IFRS_2004_06_15 s = new TestTaxonomy_IFRS_2004_06_15();

            int errors = 0;

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

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

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

            ArrayList nodes = s.GetNodesByElement();

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

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

            Assert.AreEqual( "http://xbrl.iasb.org/int/fr/ifrs/gp/2004-06-15", ti.WebLocation, "target namespace wrong" );

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