Ejemplo n.º 1
0
        public void TestLoadICIDimensionInfos()
        {
            TestDimension s      = new TestDimension();
            int           errors = 0;

            DateTime start = DateTime.Now;

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

            errors = 0;

            // this loads up all dependant taxonomies, and loads the corresponding presentation, calculation, label, and reference linkbases
            // parse presentation first

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

            s.Parse(out errors);


            Assert.IsNotNull(s.NetDefinisionInfo, "Dimension info did not load");

            List <DimensionNode> dimensionNodes;

            if (s.HasDimensionInfo(false, true))
            {
                Assert.IsTrue(
                    s.TryGetCommonDimensionNodesForDisplay(s.CurrentLanguage, s.currentLabelRole,
                                                           false, out dimensionNodes));

                Console.WriteLine("*********SCENARIO dimension information*************");

                foreach (DimensionNode n in dimensionNodes)
                {
                    StringBuilder sb = DisplayNode(n, 0);
                    Console.WriteLine(sb.ToString());
                }
            }

            if (s.HasDimensionInfo(true, true))
            {
                Console.WriteLine("*********SEGMENT dimension information*************");

                Assert.IsTrue(
                    s.TryGetCommonDimensionNodesForDisplay(s.CurrentLanguage, s.currentLabelRole,
                                                           true, out dimensionNodes));


                foreach (DimensionNode n in dimensionNodes)
                {
                    StringBuilder sb = DisplayNode(n, 0);
                    Console.WriteLine(sb.ToString());
                }
            }
        }
Ejemplo n.º 2
0
        public void TestLoadICIDimensionInfos()
        {
            TestDimension s = new TestDimension();
            int errors = 0;

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

            errors = 0;

            // this loads up all dependant taxonomies, and loads the corresponding presentation, calculation, label, and reference linkbases
            // parse presentation first

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

            s.Parse(out errors);

            Assert.IsNotNull(s.NetDefinisionInfo, "Dimension info did not load");

            List<DimensionNode> dimensionNodes;

            if (s.HasDimensionInfo(false, true))
            {
                Assert.IsTrue(
                s.TryGetCommonDimensionNodesForDisplay(s.CurrentLanguage, s.currentLabelRole,
                    false, out dimensionNodes));

                Console.WriteLine("*********SCENARIO dimension information*************");

                foreach (DimensionNode n in dimensionNodes)
                {
                    StringBuilder sb = DisplayNode(n, 0);
                    Console.WriteLine(sb.ToString());
                }

            }

            if (s.HasDimensionInfo(true, true))
            {
                Console.WriteLine("*********SEGMENT dimension information*************");

                Assert.IsTrue(
                s.TryGetCommonDimensionNodesForDisplay(s.CurrentLanguage, s.currentLabelRole,
                    true, out dimensionNodes));

                foreach (DimensionNode n in dimensionNodes)
                {
                    StringBuilder sb = DisplayNode(n, 0);
                    Console.WriteLine(sb.ToString());
                }

            }
        }
Ejemplo n.º 3
0
        public void TestLoadNewUSGaapDimensionInfos()
        {
            TestDimension s      = new TestDimension();
            int           errors = 0;

            string fileName = @"S:\TestSchemas\UGT-Prototype3b-2007-07-11\us-gaap-master.xsd";

            DateTime start = DateTime.Now;

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

            errors = 0;

            // this loads up all dependant taxonomies, and loads the corresponding presentation, calculation, label, and reference linkbases
            // parse presentation first

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

            s.Parse(out errors);


            Assert.IsNotNull(s.NetDefinisionInfo, "Dimension info did not load");

            List <DimensionNode> dimensionNodes;

            Assert.IsTrue(
                s.TryGetCommonDimensionNodesForDisplay(s.CurrentLanguage, s.currentLabelRole,
                                                       false, out dimensionNodes));

            Console.WriteLine("*********SCENARIO dimension information*************");

            foreach (DimensionNode n in dimensionNodes)
            {
                StringBuilder sb = DisplayNode(n, 0);
                Console.WriteLine(sb.ToString());
            }

            Console.WriteLine("*********SEGMENT dimension information*************");

            Assert.IsTrue(
                s.TryGetCommonDimensionNodesForDisplay(s.CurrentLanguage, s.currentLabelRole,
                                                       true, out dimensionNodes));


            foreach (DimensionNode n in dimensionNodes)
            {
                StringBuilder sb = DisplayNode(n, 0);
                Console.WriteLine(sb.ToString());
            }
        }
Ejemplo n.º 4
0
        public void TestLoadNewUSGaapDimensionInfos()
        {
            TestDimension s = new TestDimension();
            int errors = 0;

            string fileName = @"S:\TestSchemas\UGT-Prototype3b-2007-07-11\us-gaap-master.xsd";

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

            errors = 0;

            // this loads up all dependant taxonomies, and loads the corresponding presentation, calculation, label, and reference linkbases
            // parse presentation first

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

            s.Parse(out errors);

            Assert.IsNotNull(s.NetDefinisionInfo, "Dimension info did not load");

            List<DimensionNode> dimensionNodes;

            Assert.IsTrue(
            s.TryGetCommonDimensionNodesForDisplay(s.CurrentLanguage, s.currentLabelRole,
                false, out dimensionNodes));

            Console.WriteLine("*********SCENARIO dimension information*************");

            foreach (DimensionNode n in dimensionNodes)
            {
                StringBuilder sb = DisplayNode(n, 0);
                Console.WriteLine(sb.ToString());
            }

            Console.WriteLine("*********SEGMENT dimension information*************");

            Assert.IsTrue(
            s.TryGetCommonDimensionNodesForDisplay(s.CurrentLanguage, s.currentLabelRole,
                true, out dimensionNodes));

            foreach (DimensionNode n in dimensionNodes)
            {
                StringBuilder sb = DisplayNode(n, 0);
                Console.WriteLine(sb.ToString());
            }
        }