public void LoadLocators() { TestPresentationLink pl = new TestPresentationLink("Statement of Financial Position - CI","http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementFinancialPosition"); int errors = 0; TestPresentation p = new TestPresentation(); Console.WriteLine( "Using File {0}", GAAP_PRESENTATION_FILE ); p.Load( GAAP_PRESENTATION_FILE); XmlNodeList pLinksList = p.TheDocument.SelectNodes( Presentation.PLINK_KEY, p.TheManager ); if ( pLinksList == null || pLinksList.Count == 0 ) { Assert.Fail( "no nodes returned" ); } XmlNode plNode = pLinksList.Item(0); pl.LoadChildren( plNode, p.TheManager, out errors ); Assert.AreEqual( 0, errors ); Assert.AreEqual( 290, pl.locators.Count ); //total count of prohibited mappings int count = 0; foreach ( PresentationLocator ploc in pl.locators.Values ) { TestPresentationLocator tpl = new TestPresentationLocator( ploc ); count += tpl.NumProhibited(); } Assert.AreEqual( 8, count ); }
/// <exclude/> [Test] public void VerifyXmlString() { TestPresentationLink pl = new TestPresentationLink("Statement of Financial Position - CI", "http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementFinancialPosition"); int errors = 0; TestPresentation p = new TestPresentation(); Console.WriteLine("Using File {0}", GAAP_PRESENTATION_FILE); p.Load(GAAP_PRESENTATION_FILE); XmlNodeList pLinksList = p.TheDocument.SelectNodes(Presentation.PLINK_KEY, p.TheManager); if (pLinksList == null || pLinksList.Count == 0) { Assert.Fail("no nodes returned"); } XmlNode plNode = pLinksList.Item(0); pl.LoadChildren(plNode, p.TheManager, out errors); Assert.AreEqual(0, errors); string xml = pl.ToXmlString(); //Console.WriteLine( xml ); XmlDocument doc = new XmlDocument(); //XmlDocumentFragment frag = doc.CreateDocumentFragment(); doc.LoadXml(xml); }
public void LoadLocators() { TestPresentationLink pl = new TestPresentationLink("Statement of Financial Position - CI", "http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementFinancialPosition"); int errors = 0; TestPresentation p = new TestPresentation(); Console.WriteLine("Using File {0}", GAAP_PRESENTATION_FILE); p.Load(GAAP_PRESENTATION_FILE); XmlNodeList pLinksList = p.TheDocument.SelectNodes(Presentation.PLINK_KEY, p.TheManager); if (pLinksList == null || pLinksList.Count == 0) { Assert.Fail("no nodes returned"); } XmlNode plNode = pLinksList.Item(0); pl.LoadChildren(plNode, p.TheManager, out errors); Assert.AreEqual(0, errors); Assert.AreEqual(290, pl.locators.Count); //total count of prohibited mappings int count = 0; foreach (PresentationLocator ploc in pl.locators.Values) { TestPresentationLocator tpl = new TestPresentationLocator(ploc); count += tpl.NumProhibited(); } Assert.AreEqual(8, count); }
public void VerifyXmlString() { TestPresentationLink pl = new TestPresentationLink("Statement of Financial Position - CI","http://www.xbrl.org/taxonomy/us/fr/gaap/role/StatementFinancialPosition"); int errors = 0; TestPresentation p = new TestPresentation(); Console.WriteLine( "Using File {0}", GAAP_PRESENTATION_FILE ); p.Load( GAAP_PRESENTATION_FILE); XmlNodeList pLinksList = p.TheDocument.SelectNodes( Presentation.PLINK_KEY, p.TheManager ); if ( pLinksList == null || pLinksList.Count == 0 ) { Assert.Fail( "no nodes returned" ); } XmlNode plNode = pLinksList.Item(0); pl.LoadChildren( plNode, p.TheManager, out errors ); Assert.AreEqual( 0, errors ); string xml = pl.ToXmlString(); //Console.WriteLine( xml ); XmlDocument doc = new XmlDocument(); //XmlDocumentFragment frag = doc.CreateDocumentFragment(); doc.LoadXml( xml ); }