Exemple #1
0
        [Test] public void GAAP_LoadImports()
        {
            //Trace.Listeners.Add( new TextWriterTraceListener(Console.Out) );

            TestTaxonomy_2004_07_06 s = new TestTaxonomy_2004_07_06();

            int errors = 0;

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

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

            errors = 0;
            s.LoadPresentation(out errors);
            //Assert.AreEqual( 22, errors, "wrong number of load presentation errors" );

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

            // accounting policies is defined in the usfr-pt schema
            Assert.IsTrue(s.allElements.ContainsKey("AccountingPolicies"));

            //Trace.Listeners.Clear();
        }
Exemple #2
0
        [Test] public void GAAP_LoadImportsAndBind()
        {
            //Trace.Listeners.Add( new TextWriterTraceListener(Console.Out) );

            TestTaxonomy_2004_07_06 s = new TestTaxonomy_2004_07_06();

            int errors = 0;

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

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

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

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

            errors = 0;
            s.BindElements(new BindElementDelegate(s.BindElementToLocator), out errors);
            Assert.AreEqual(0, errors, "wrong number of bind errors");

            if (s.numWarnings > 0)
            {
                s.ErrorList.Sort();
                foreach (ParserMessage pm in s.ErrorList)
                {
                    if (pm.Level == TraceLevel.Warning)
                    {
                        Console.WriteLine("Warning: " + pm.Message);
                    }
                }
            }

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

            // accounting policies is defined in the usfr-pt schema
            Assert.IsTrue(s.allElements.ContainsKey("AccountingPolicies"));

            //Trace.Listeners.Clear();
        }
        public void GAAP_LoadImportsAndBind()
        {
            //Trace.Listeners.Add( new TextWriterTraceListener(Console.Out) );

            TestTaxonomy_2004_07_06 s = new TestTaxonomy_2004_07_06();

            int errors = 0;

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

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

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

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

            errors = 0;
            s.BindElements( new BindElementDelegate( s.BindElementToLocator ), out errors );
            Assert.AreEqual( 0, errors, "wrong number of bind errors" );

            if ( s.numWarnings > 0 )
            {
                s.ErrorList.Sort();
                foreach ( ParserMessage pm in s.ErrorList )
                {
                    if ( pm.Level == TraceLevel.Warning )
                    {
                        Console.WriteLine( "Warning: " + pm.Message );
                    }
                }
            }

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

            // accounting policies is defined in the usfr-pt schema
            Assert.IsTrue( s.allElements.ContainsKey( "AccountingPolicies" ) );

            //Trace.Listeners.Clear();
        }
        public void GAAP_LoadImports()
        {
            //Trace.Listeners.Add( new TextWriterTraceListener(Console.Out) );

            TestTaxonomy_2004_07_06 s = new TestTaxonomy_2004_07_06();

            int errors = 0;

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

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

            errors = 0;
            s.LoadPresentation( out errors );
            //Assert.AreEqual( 22, errors, "wrong number of load presentation errors" );

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

            // accounting policies is defined in the usfr-pt schema
            Assert.IsTrue( s.allElements.ContainsKey( "AccountingPolicies" ) );

            //Trace.Listeners.Clear();
        }