Esempio n. 1
0
        [Test] public void GAAP_VerifyPresentationTypes()
        {
            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.TestParse( out errors );
            //Assert.AreEqual( 22, errors, "parse failed" );
            s.LoadRoleTypes(out errors);
            Assert.AreEqual(0, errors, "load role types returned the wrong number of errors");

            errors = 0;
            Presentation p = s.LoadPresentationSchema(out errors);

            //Assert.AreEqual(22, errors, "presentation schema failed" );	// PROBLEM with us-gaap-ci-2004-07-06-presentation.xml ?
            Assert.IsNotNull(p);

            if (s.VerifyPresentationTypes(p, out errors) == false)
            {
                Assert.Fail("There are " + errors + " failures in the VerifyPresentationTypes call");
            }
        }
Esempio n. 2
0
        [Test] public void PT_LoadPresentationSchema()
        {
            TestTaxonomy_2004_07_06 s = new TestTaxonomy_2004_07_06();

            s.Load(PT_GAAP_FILE);

            int          errors = 0;
            Presentation p      = s.LoadPresentationSchema(out errors);

            Assert.IsNotNull(p);
            Assert.AreEqual(0, errors, "wrong number of errors");
            Assert.AreEqual(0, s.numWarnings, "wrong number of warnings");
        }
Esempio n. 3
0
        [Test] public void GAAP_LoadPresentationSchema()
        {
            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;
            Presentation p = s.LoadPresentationSchema(out errors);

            Assert.IsNotNull(p);
            //Assert.AreEqual( 22, errors );
        }
Esempio n. 4
0
        [Test] public void PT_ReadElements()
        {
            TestTaxonomy_2004_07_06 s = new TestTaxonomy_2004_07_06();

            s.Load(PT_GAAP_FILE);

            int          errors = 0;
            Presentation p      = s.LoadPresentationSchema(out errors);

            Assert.AreEqual(0, errors, "load presentation failed");
            Assert.AreEqual(0, s.numWarnings, "wrong number of warnings");

            s.presentationInfo = p.PresentationLinks;

            s.LoadElements(out errors);
            Assert.AreEqual(0, errors, "load elements failed");
        }
Esempio n. 5
0
        [Test] public void PT_BindElements()
        {
            TestTaxonomy_2004_07_06 s = new TestTaxonomy_2004_07_06();

            DateTime start = DateTime.Now;

            s.Load(PT_GAAP_FILE);

            int errors = 0;

            DateTime     startPres = DateTime.Now;
            Presentation p         = s.LoadPresentationSchema(out errors);
            DateTime     endPres   = DateTime.Now;

            Assert.AreEqual(0, errors, "load presentation failed");
            Assert.AreEqual(0, s.numWarnings, "num warnings wrong");

            s.presentationInfo = p.PresentationLinks;

            DateTime startElems = DateTime.Now;

            s.LoadElements(out errors);
            DateTime endElems = DateTime.Now;

            Assert.AreEqual(0, errors, "load elements failed");

            DateTime startBind = DateTime.Now;

            s.BindElements(new BindElementDelegate(s.BindElementToLocator), out errors);
            DateTime endBind = DateTime.Now;

            Console.WriteLine("Total Time:			{0}", endBind - start);
            Console.WriteLine("Read Presentation	{0}", endPres - startPres);
            Console.WriteLine("Read Elements		{0}", endElems - startElems);
            Console.WriteLine("Bind Elements		{0}", endBind - startBind);

            Assert.AreEqual(0, errors, "bind elements failed");
            Assert.AreEqual(0, s.numWarnings, "num warnings wrong");
        }
        public void GAAP_BindElements()
        {
            TestTaxonomy_2004_07_06 s = new TestTaxonomy_2004_07_06();

            int errors = 0;

            s.Load( US_GAAP_FILE );

            Presentation p = s.LoadPresentationSchema( out errors );
            //Assert.AreEqual( 22, errors, "load presentation failed" );

            s.presentationInfo = p.PresentationLinks;

            s.LoadElements( out errors );

            Assert.AreEqual( 0, errors, "load elements failed" );

            s.BindElements( new BindElementDelegate( s.BindElementToLocator ), out errors );

            Assert.AreEqual( 0, errors, "bind elements failed" );
            Assert.AreEqual( 0, s.numWarnings, "wrong number of warnings" );
        }
Esempio n. 7
0
        [Test] public void PT_BindLabelsToElements()
        {
            TestTaxonomy_2004_07_06 s = new TestTaxonomy_2004_07_06();

            int errors = 0;

            s.Load(PT_GAAP_FILE);

            errors = 0;

            Presentation p = s.LoadPresentationSchema(out errors);

            Assert.AreEqual(0, errors, "load presentation failed");

            s.presentationInfo = p.PresentationLinks;

            s.LoadElements(out errors);

            Assert.AreEqual(0, errors, "load elements failed");

            s.BindElements(new BindElementDelegate(s.BindElementToLocator), out errors);

            Assert.AreEqual(0, errors, "bind elements failed");
            Assert.AreEqual(0, s.numWarnings, "bind elements failed - wrong number of warnings");

            errors = 0;
            s.LoadLabels(out errors);
            Assert.AreEqual(0, errors, "load labels failed");

            //Trace.Listeners.Add( new TextWriterTraceListener(Console.Out) );

            errors        = 0;
            s.numWarnings = 0;
            s.BindElements(new BindElementDelegate(s.BindLabelToElement), out errors);
            Assert.AreEqual(0, errors, "bind labels failure");                  // linkPart_Name, Subparagraph, Number, Paragraph, Chapter, no corresponding label info
            Assert.AreEqual(0, s.numWarnings, "wrong number of bind labels warnings");
            //Trace.Listeners.Clear();
        }
Esempio n. 8
0
        [Test] public void GAAP_BindElements()
        {
            TestTaxonomy_2004_07_06 s = new TestTaxonomy_2004_07_06();

            int errors = 0;

            s.Load(US_GAAP_FILE);

            Presentation p = s.LoadPresentationSchema(out errors);

            //Assert.AreEqual( 22, errors, "load presentation failed" );

            s.presentationInfo = p.PresentationLinks;

            s.LoadElements(out errors);

            Assert.AreEqual(0, errors, "load elements failed");

            s.BindElements(new BindElementDelegate(s.BindElementToLocator), out errors);

            Assert.AreEqual(0, errors, "bind elements failed");
            Assert.AreEqual(0, s.numWarnings, "wrong number of warnings");
        }
Esempio n. 9
0
        [Test] public void PT_VerifyPresentationTypes()
        {
            TestTaxonomy_2004_07_06 s = new TestTaxonomy_2004_07_06();

            s.Load(PT_GAAP_FILE);

            int errors = 0;

            s.LoadRoleTypes(out errors);
            //s.TestParse( out errors );
            Assert.AreEqual(0, errors, "load role types failure");

            Presentation p = s.LoadPresentationSchema(out errors);

            Assert.AreEqual(0, errors, "wrong number of errors");
            Assert.AreEqual(0, s.numWarnings, "wrong number of warnings");
            Assert.IsNotNull(p);

            if (s.VerifyPresentationTypes(p, out errors) == false)
            {
                Assert.Fail("There are " + errors + " failures in the VerifyPresentationTypes call");
            }
        }
Esempio n. 10
0
        public void GAAP_VerifyPresentationTypes()
        {
            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.TestParse( out errors );
            //Assert.AreEqual( 22, errors, "parse failed" );
            s.LoadRoleTypes( out errors );
            Assert.AreEqual( 0, errors, "load role types returned the wrong number of errors" );

            errors = 0;
            Presentation p = s.LoadPresentationSchema( out errors );
            //Assert.AreEqual(22, errors, "presentation schema failed" );	// PROBLEM with us-gaap-ci-2004-07-06-presentation.xml ?
            Assert.IsNotNull( p );

            if ( s.VerifyPresentationTypes( p, out errors ) == false )
            {
                Assert.Fail( "There are " + errors + " failures in the VerifyPresentationTypes call" );
            }
        }
Esempio n. 11
0
        public void PT_VerifyPresentationTypes()
        {
            TestTaxonomy_2004_07_06 s = new TestTaxonomy_2004_07_06();

            s.Load( PT_GAAP_FILE);

            int errors = 0;

            s.LoadRoleTypes( out errors );
            //s.TestParse( out errors );
            Assert.AreEqual( 0, errors, "load role types failure" );

            Presentation p = s.LoadPresentationSchema( out errors );
            Assert.AreEqual(0, errors, "wrong number of errors" );
            Assert.AreEqual(0, s.numWarnings, "wrong number of warnings" );
            Assert.IsNotNull( p );

            if ( s.VerifyPresentationTypes( p, out errors ) == false )
            {
                Assert.Fail( "There are " + errors + " failures in the VerifyPresentationTypes call" );
            }
        }
Esempio n. 12
0
        public void PT_ReadElements()
        {
            TestTaxonomy_2004_07_06 s = new TestTaxonomy_2004_07_06();

            s.Load( PT_GAAP_FILE);

            int errors = 0;
            Presentation p = s.LoadPresentationSchema( out errors );
            Assert.AreEqual( 0, errors, "load presentation failed" );
            Assert.AreEqual( 0, s.numWarnings, "wrong number of warnings" );

            s.presentationInfo = p.PresentationLinks;

            s.LoadElements( out errors );
            Assert.AreEqual( 0, errors, "load elements failed" );
        }
Esempio n. 13
0
        public void PT_LoadPresentationSchema()
        {
            TestTaxonomy_2004_07_06 s = new TestTaxonomy_2004_07_06();

            s.Load( PT_GAAP_FILE);

            int errors = 0;
            Presentation p = s.LoadPresentationSchema( out errors );
            Assert.IsNotNull( p );
            Assert.AreEqual( 0, errors, "wrong number of errors" );
            Assert.AreEqual( 0, s.numWarnings, "wrong number of warnings" );
        }
Esempio n. 14
0
        public void PT_BindLabelsToElements()
        {
            TestTaxonomy_2004_07_06 s = new TestTaxonomy_2004_07_06();

            int errors = 0;

            s.Load( PT_GAAP_FILE);

            errors = 0;

            Presentation p = s.LoadPresentationSchema( out errors );
            Assert.AreEqual( 0, errors, "load presentation failed" );

            s.presentationInfo = p.PresentationLinks;

            s.LoadElements( out errors );

            Assert.AreEqual( 0, errors, "load elements failed" );

            s.BindElements( new BindElementDelegate( s.BindElementToLocator ), out errors );

            Assert.AreEqual( 0, errors, "bind elements failed" );
            Assert.AreEqual( 0, s.numWarnings, "bind elements failed - wrong number of warnings" );

            errors = 0;
            s.LoadLabels( out errors );
            Assert.AreEqual( 0, errors, "load labels failed" );

            //Trace.Listeners.Add( new TextWriterTraceListener(Console.Out) );

            errors = 0;
            s.numWarnings = 0;
            s.BindElements( new BindElementDelegate( s.BindLabelToElement ), out errors );
            Assert.AreEqual( 0, errors, "bind labels failure" );	// linkPart_Name, Subparagraph, Number, Paragraph, Chapter, no corresponding label info
            Assert.AreEqual( 0, s.numWarnings, "wrong number of bind labels warnings" );
            //Trace.Listeners.Clear();
        }
Esempio n. 15
0
        public void PT_BindElements()
        {
            TestTaxonomy_2004_07_06 s = new TestTaxonomy_2004_07_06();

            DateTime start = DateTime.Now;
            s.Load( PT_GAAP_FILE);

            int errors = 0;

            DateTime startPres = DateTime.Now;
            Presentation p = s.LoadPresentationSchema( out errors );
            DateTime endPres = DateTime.Now;
            Assert.AreEqual( 0, errors, "load presentation failed" );
            Assert.AreEqual( 0, s.numWarnings, "num warnings wrong" );

            s.presentationInfo = p.PresentationLinks;

            DateTime startElems = DateTime.Now;
            s.LoadElements( out errors );
            DateTime endElems = DateTime.Now;

            Assert.AreEqual( 0, errors, "load elements failed" );

            DateTime startBind = DateTime.Now;
            s.BindElements( new BindElementDelegate( s.BindElementToLocator ), out errors );
            DateTime endBind = DateTime.Now;

            Console.WriteLine( "Total Time:			{0}", endBind-start );
            Console.WriteLine( "Read Presentation	{0}", endPres-startPres );
            Console.WriteLine( "Read Elements		{0}", endElems-startElems );
            Console.WriteLine( "Bind Elements		{0}", endBind-startBind );

            Assert.AreEqual( 0, errors, "bind elements failed" );
            Assert.AreEqual( 0, s.numWarnings, "num warnings wrong" );
        }
Esempio n. 16
0
        public void GAAP_LoadPresentationSchema()
        {
            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;
            Presentation p = s.LoadPresentationSchema( out errors );
            Assert.IsNotNull( p );
            //Assert.AreEqual( 22, errors );
        }