예제 #1
0
        [Test] public void PT_LoadLabels()
        {
            TestTaxonomy_2004_07_06 s = new TestTaxonomy_2004_07_06();

            s.Load(PT_GAAP_FILE);

            int errors = 0;

            s.LoadLabels(out errors);

            Assert.AreEqual(0, errors);
            Assert.AreEqual(1556, s.labelTable.Count);
        }
예제 #2
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();
        }
예제 #3
0
        public void PT_LoadLabels()
        {
            TestTaxonomy_2004_07_06 s = new TestTaxonomy_2004_07_06();

            s.Load( PT_GAAP_FILE );

            int errors = 0;
            s.LoadLabels( out errors );

            Assert.AreEqual( 0, errors );
            Assert.AreEqual( 1556, s.labelTable.Count );
        }
예제 #4
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();
        }