Пример #1
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" );
        }
Пример #2
0
        public void IFRS_LoadImports()
        {
            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 );
            //Assert.AreEqual( 22, errors, "wrong number of load presentation errors" );

            errors = 0;
            s.LoadElements( out errors );
            Assert.AreEqual( 0, errors, "wrong number of load element errors" );

            errors = 0;
            s.LoadImports( out errors );
            Assert.AreEqual( 0, errors, "wrong number of load import 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" );
        }