public void CT_LoadAndParse() { //Trace.Listeners.Add( new TextWriterTraceListener(Console.Out) ); TestTaxonomy_CT_Comp s = new TestTaxonomy_CT_Comp(); int errors = 0; if (s.Load(CT_FILE, out errors) != true) { Assert.Fail((string)s.ErrorList[0]); } errors = 0; // this loads up all dependant taxonomies, and loads the corresponding presentation, calculation, label, and reference linkbases s.Parse(out errors); // loads the presentation linkbase for this taxonomy and merges the dependant taxonomy presentation linkbases if (errors > 0) { SendErrorsToConsole(s.errorList); SendWarningsToConsole(s.errorList); SendInfoToConsole(s.ErrorList); } Assert.AreEqual(0, errors, "parse failed"); // 1 duplicate element // PresentationLink pl = s.presentationInfo[ "http://www.xbrl.org/us/fr/lr/role/PortfolioInvestments" ] as PresentationLink; // // Assert.IsNotNull( pl, "can't get http://www.xbrl.org/us/fr/lr/role/PortfolioInvestments" ); // // Node parentNode = pl.CreateNode( "en", "label" ); // // Assert.AreEqual(1, parentNode.Children.Count, "wrong number of children" ); }
public void CT_LoadAndParse() { //Trace.Listeners.Add( new TextWriterTraceListener(Console.Out) ); TestTaxonomy_CT_Comp s = new TestTaxonomy_CT_Comp(); int errors = 0; if ( s.Load( CT_FILE, out errors ) != true ) { Assert.Fail( (string)s.ErrorList[0]); } errors = 0; // this loads up all dependant taxonomies, and loads the corresponding presentation, calculation, label, and reference linkbases s.Parse( out errors ); // loads the presentation linkbase for this taxonomy and merges the dependant taxonomy presentation linkbases if ( errors > 0 ) { SendErrorsToConsole( s.errorList ); SendWarningsToConsole( s.errorList ); SendInfoToConsole( s.ErrorList ); } Assert.AreEqual( 0, errors, "parse failed" ); // 1 duplicate element // PresentationLink pl = s.presentationInfo[ "http://www.xbrl.org/us/fr/lr/role/PortfolioInvestments" ] as PresentationLink; // // Assert.IsNotNull( pl, "can't get http://www.xbrl.org/us/fr/lr/role/PortfolioInvestments" ); // // Node parentNode = pl.CreateNode( "en", "label" ); // // Assert.AreEqual(1, parentNode.Children.Count, "wrong number of children" ); }