Esempio n. 1
0
        public void IFRS_BindCalculation()
        {
            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.Parse( out errors );

            s.numWarnings = errors = 0;
            s.BindPresentationCalculationElements( false, out errors );
            if ( errors != 0 )
            {
                SendErrorsToConsole( s.errorList );
            }

            Assert.AreEqual( 0, errors, "Bind calc failed" );
            Assert.AreEqual( 0, s.numWarnings, "num warnings wrong" );
        }
Esempio n. 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" );
        }
Esempio n. 3
0
        public void IFRS_LoadImportsAndBind()
        {
            TestTaxonomy_IFRS s = new TestTaxonomy_IFRS();
            int errors = 0;

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

            errors = 0;
            s.LoadPresentation( out errors );
            if ( errors > 0 )
            {
                SendErrorsToConsole( s.errorList );
            }

            Assert.AreEqual( 0, errors, "wrong number of load presentation errors" );

            errors = 0;
            s.LoadElements( out errors );
            if ( errors > 0 )
            {
                SendErrorsToConsole( s.errorList );
            }

            Assert.AreEqual( 0, errors, "wrong number of load element errors" );

            errors = 0;
            s.LoadImports( out errors );
            if ( errors > 0 )
            {
                SendErrorsToConsole( s.errorList );
            }

            Assert.AreEqual( 0, errors, "wrong number of load import errors" );	// 5 ci elements are duplicated in the usfr-pt schema
            Assert.AreEqual( 0, s.numWarnings, "wrong number of warnings" );

            errors = 0;
            s.BindPresentationCalculationElements( true, out errors );

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

            // accounting policies is defined in the usfr-pt schema
            Assert.IsTrue( s.allElements.ContainsKey( "ifrs-gp_WorkInProgress" ), "Can't find ifrs-gp_WorkInProgress" );
        }