Пример #1
0
        public void IFRS_LoadPresentationSchema()
        {
            TestTaxonomy_IFRS s = new TestTaxonomy_IFRS();

            int errors = 0;

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

            errors = 0;
            Presentation p = s.LoadPresentationSchema( out errors );
            Assert.IsNotNull( p );
            Assert.AreEqual( 0, errors );
        }
Пример #2
0
        public void IFRS_BindElements()
        {
            TestTaxonomy_IFRS s = new TestTaxonomy_IFRS();
            int errors = 0;

            s.Load( IFRS_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.BindPresentationCalculationElements( true, out errors );

            Assert.AreEqual( 0, errors, "bind elements failed" );
            Assert.AreEqual( 0, s.numWarnings, "num warnings wrong" );
        }
Пример #3
0
        public void IFRS_VerifyPresentationTypes()
        {
            TestTaxonomy_IFRS s = new TestTaxonomy_IFRS();

            int errors = 0;

            if ( s.Load( IFRS_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 );
            if ( errors > 0 )
            {
                SendErrorsToConsole( p.ErrorList );
            }

            Assert.AreEqual(0, errors, "presentation schema failed" );	// PROBLEM with us-IFRS-ci-2004-08-15-presentation.xml ?
            Assert.IsNotNull( p );

            p.ErrorList.Clear();

            if ( s.VerifyPresentationTypes( p, out errors ) == false )
            {
                if ( errors > 0 )
                {
                    SendErrorsToConsole( s.ErrorList );
                }

                Assert.Fail( "There are " + errors + " failures in the VerifyPresentationTypes call" );
            }
        }