[Test] public void ifrs_Test_VerifyTuples() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.CurrentLabelRole = "label"; s.CurrentLanguage = "en"; s.Load(IFRS_FILE); int errors = 0; s.Parse(out errors); ArrayList nodeList = s.GetNodesByElement(); Assert.IsNotNull(nodeList); Assert.AreEqual(2591, nodeList.Count); Console.WriteLine("Found Tuple Nodes: "); foreach (Node n in nodeList) { RecurseVerifyTuples(n); } }
[Test] public void GAAP_VerifyPresentationTypes() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); int errors = 0; if (s.Load(US_GAAP_FILE, out errors) != true) { Assert.Fail((string)s.ErrorList[0]); } errors = 0; //s.TestParse( out errors ); //Assert.AreEqual( 22, errors, "parse failed" ); s.LoadRoleTypes(out errors); Assert.AreEqual(0, errors, "load role types returned the wrong number of errors"); errors = 0; Presentation p = s.LoadPresentationSchema(out errors); Assert.AreEqual(22, errors, "presentation schema failed"); Assert.IsNotNull(p); if (s.VerifyPresentationTypes(p, out errors) == false) { Assert.Fail("There are " + errors + " failures in the VerifyPresentationTypes call"); } }
[Test] public void ifrs_Parse() { //Trace.Listeners.Add( new TextWriterTraceListener(Console.Out) ); TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); int errors = 0; DateTime start = DateTime.Now; if (s.Load(IFRS_FILE, out errors) != true) { Assert.Fail((string)s.ErrorList[0]); } errors = 0; s.Parse(out errors); DateTime end = DateTime.Now; Console.WriteLine("Parse Time: {0}", end - start); TimeSpan level = new TimeSpan(0, 0, 0, 10, 0); // 10 seconds to parse Assert.IsTrue(level > (end - start), "Parse takes too long"); PresentationLink pl = s.presentationInfo["Accounting Policies"] as PresentationLink; Assert.IsNotNull(pl); }
[Test] public void ifrs_LoadImports() { //Trace.Listeners.Add( new TextWriterTraceListener(Console.Out) ); TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); 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(144, errors, "wrong number of load presentation errors"); errors = 0; s.LoadElements(out errors); Assert.AreEqual(5, errors, "wrong number of load element errors"); errors = 0; s.LoadImports(out errors); Assert.AreEqual(0, errors, "wrong number of load import errors"); // accounting policies is defined in the usfr-pt schema Assert.IsTrue(s.allElements.ContainsKey("OtherLiabilitiesPolicy")); //Trace.Listeners.Clear(); }
[Test] public void GAAP_LoadImportsAndBind() { //Trace.Listeners.Add( new TextWriterTraceListener(Console.Out) ); TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); int errors = 0; if (s.Load(US_GAAP_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(5, errors, "wrong number of load import errors"); // 5 ci elements are duplicated in the usfr-pt schema errors = 0; s.BindElements(new BindElementDelegate(s.BindElementToLocator), out errors); Assert.AreEqual(690, errors, "wrong number of bind errors"); // accounting policies is defined in the usfr-pt schema Assert.IsTrue(s.allElements.ContainsKey("AccountingPolicies")); //Trace.Listeners.Clear(); }
[Test][Ignore("Just used to view nodes")] public void GAAP_Test_GetNodesByElement() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.CurrentLabelRole = "label"; s.CurrentLanguage = "en"; s.Load(US_GAAP_FILE); int errors = 0; s.Parse(out errors); ArrayList nodeList = s.GetNodesByElement(); Assert.IsNotNull(nodeList); Assert.AreEqual(1367, nodeList.Count); Console.WriteLine("Nodes By Element: "); foreach (Node n in nodeList) { Console.WriteLine(TestNode.ToXml(0, n)); } }
[Test] public void GAAP_LoadSchema() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); int errors = 0; Assert.AreEqual(true, s.Load(US_GAAP_FILE, out errors), "Could not load US GAAP File"); }
[Test] public void GAAP_TargetNamespace() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load(US_GAAP_FILE); s.GetTargetNamespace(); Assert.AreEqual("http://www.xbrl.org/taxonomy/us/fr/gaap/ci/us-gaap-ci-2004-06-15", s.targetNamespace); }
[Test][Ignore("Worry about this later")] public void SAG_TargetNamespace() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load(SAG_FILE); s.GetTargetNamespace(); Assert.IsNull(s.targetNamespace); }
[Test] public void PT_TargetNamespace() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load(PT_GAAP_FILE); s.GetTargetNamespace(); Assert.AreEqual("http://www.xbrl.org/taxonomy/us/fr/common/pt/usfr-pt-2004-06-15", s.targetNamespace); }
[Test] public void ifrs_TargetNamespace() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load(IFRS_FILE); s.GetTargetNamespace(); Assert.AreEqual("http://xbrl.iasb.org/int/fr/ifrs/gp/2004-06-15", s.targetNamespace); }
[Test][Ignore("do this later")] public void SAG_GetLinkbaseRef_Presentation() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load(SAG_FILE); string labelRef = s.GetLinkbaseReference(TestTaxonomy_2004_06_15.TARGET_LINKBASE_URI + TestTaxonomy_2004_06_15.PRESENTATION_ROLE); Assert.AreEqual("blue", labelRef); }
[Test] public void PT_Parse() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load(PT_GAAP_FILE); int errors = 0; s.Parse(out errors); Assert.AreEqual(1898, errors); }
[Test] public void PT_LoadPresentationSchema() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load(PT_GAAP_FILE); int errors = 0; Presentation p = s.LoadPresentationSchema(out errors); Assert.IsNotNull(p); Assert.AreEqual(4, errors); }
[Test] public void ifrs_ReadElements() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); int errors = 0; s.Load(IFRS_FILE); int numElements = s.LoadElements(out errors); Assert.AreEqual(5, errors); Assert.AreEqual(2591, s.allElements.Count); }
[Test] public void PT_LoadLabels() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load(PT_GAAP_FILE); int errors = 0; s.LoadLabels(out errors); Assert.AreEqual(0, errors); Assert.AreEqual(1478, s.labelTable.Count); }
[Test] public void GAAP_GetSupportedLanguages() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load(US_GAAP_FILE); int errors = 0; ArrayList langs = s.GetSupportedLanguages(false, out errors); Assert.AreEqual(0, errors); Assert.AreEqual(1, langs.Count); Assert.AreEqual("en", langs[0]); }
[Test] public void GAAP_ReadElements() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); int errors = 0; s.Load(US_GAAP_FILE); int numElements = s.LoadElements(out errors); Assert.AreEqual(0, errors); Assert.AreEqual(5, s.allElements.Count); }
[Test] public void PT_GetLinkbaseRef_Presentation() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load(PT_GAAP_FILE); string presRef = s.GetLinkbaseReference(TestTaxonomy_2004_06_15.TARGET_LINKBASE_URI + TestTaxonomy_2004_06_15.PRESENTATION_ROLE); #if AUTOMATED Assert.AreEqual(@"q:\MAX\axe\XBRLParser\TestSchemas\XBRL 2.1 Updated\2004-06-15\usfr-pt-2004-06-15-presentation.xml", presRef); #else Assert.AreEqual(@"c:\Aucent\MAX\axe\XBRLParser\TestSchemas\XBRL 2.1 Updated\2004-06-15\usfr-pt-2004-06-15-presentation.xml", presRef); #endif }
[Test] public void ifrs_GetLinkbaseRef_Presentation() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); int errors = 0; Assert.AreEqual(true, s.Load(IFRS_FILE, out errors), "Could not load US IFRS File"); string presRef = s.GetLinkbaseReference(TestTaxonomy_2004_06_15.TARGET_LINKBASE_URI + TestTaxonomy_2004_06_15.PRESENTATION_ROLE); #if AUTOMATED Assert.AreEqual(@"q:\MAX\axe\XBRLParser\TestSchemas\ifrs\ifrs-gp-2004-06-15-presentation.xml", presRef); #else Assert.AreEqual(@"C:\AUCENT\MAX\AXE\XBRLParser\TestSchemas\ifrs\ifrs-gp-2004-06-15-presentation.xml", presRef); #endif }
[Test] public void PT_ReadElements() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load(PT_GAAP_FILE); int errors = 0; Presentation p = s.LoadPresentationSchema(out errors); Assert.AreEqual(4, errors, "load presentation failed"); s.presentationInfo = p.PresentationLinks; s.LoadElements(out errors); Assert.AreEqual(0, errors, "load elements failed"); }
[Test] public void GAAP_GetLinkbaseRef_Presentation() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); int errors = 0; Assert.AreEqual(true, s.Load(US_GAAP_FILE, out errors), "Could not load US GAAP File"); string presRef = s.GetLinkbaseReference(TestTaxonomy_2004_06_15.TARGET_LINKBASE_URI + TestTaxonomy_2004_06_15.PRESENTATION_ROLE); #if AUTOMATED Assert.AreEqual(@"q:\MAX\axe\XBRLParser\TestSchemas\XBRL 2.1 Updated\2004-06-15\us-gaap-ci-2004-06-15-presentation.xml", presRef); #else Assert.AreEqual(@"c:\Aucent\MAX\axe\XBRLParser\TestSchemas\XBRL 2.1 Updated\2004-06-15\us-gaap-ci-2004-06-15-presentation.xml", presRef); #endif }
[Test][Ignore("Takes a while")] public void ifrs_OutputTaxonomy() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load(IFRS_FILE); int errors = 0; s.Parse(out errors); #if !AUTOMATED using (StreamWriter sw = new StreamWriter(US_OUT_FILE)) { sw.Write(s.ToXmlString()); } #endif }
[Test] public void ifrs_GetLabelRoles() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load(IFRS_FILE); int errors = 0; ArrayList roles = s.GetLabelRoles(false, out errors); Assert.AreEqual(0, errors); Assert.AreEqual(5, roles.Count); Assert.AreEqual("documentation", roles[0]); Assert.AreEqual("label", roles[1]); Assert.AreEqual("periodEndLabel", roles[2]); Assert.AreEqual("periodStartLabel", roles[3]); Assert.AreEqual("restated", roles[4]); }
[Test] public void GAAP_LoadPresentationSchema() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); int errors = 0; if (s.Load(US_GAAP_FILE, out errors) != true) { Assert.Fail((string)s.ErrorList[0]); } errors = 0; Presentation p = s.LoadPresentationSchema(out errors); Assert.IsNotNull(p); Assert.AreEqual(22, errors); }
[Test][Ignore("Superceded by GAAP_OutputTaxonomy")] public void PT_OutputTaxonomy() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load(PT_GAAP_FILE); int errors = 0; s.Parse(out errors); #if !AUTOMATED using (StreamWriter sw = new StreamWriter(PT_OUT_FILE)) { sw.Write(s.ToXmlString()); } #endif }
[Test] public void GAAP_Parse() { //Trace.Listeners.Add( new TextWriterTraceListener(Console.Out) ); TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); int errors = 0; DateTime start = DateTime.Now; if (s.Load(US_GAAP_FILE, out errors) != true) { Assert.Fail((string)s.ErrorList[0]); } errors = 0; s.Parse(out errors); DateTime end = DateTime.Now; Console.WriteLine("Parse Time: {0}", end - start); TimeSpan level = new TimeSpan(0, 0, 0, 4, 0); // 4 seconds to parse Assert.IsTrue(level > (end - start), "Parse takes too long"); PresentationLink pl = s.presentationInfo["Statement of Cash Flows - Direct Method - CI"] as PresentationLink; Assert.IsNotNull(pl); PresentationLocator ploc = null; Assert.IsTrue(pl.TryGetLocator("usfr-pt_NetIncreaseDecreaseCashCashEquivalents", out ploc)); Assert.AreEqual(22 + 690 + 5 + 4 + 5 + 953 + 1474, errors, "parse failure"); // 22 = presentation load errors // 690 = bind failures - elements w/o presentation // 5 = imports - 5 duplicate elements // 4 = duplicate labels // 5 = elements without matching labels // 953 = elements without ref // 1474 = element without calc //Trace.Listeners.Clear(); }
public void GAAP_GetLabelRoles() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load( US_GAAP_FILE ); int errors = 0; ArrayList roles = s.GetLabelRoles( false, out errors ); Assert.AreEqual( 0, errors ); Assert.AreEqual( 6, roles.Count ); Assert.AreEqual( "documentation", roles[0] ); Assert.AreEqual( "label", roles[1] ); Assert.AreEqual( "periodEndLabel", roles[2] ); Assert.AreEqual( "periodStartLabel", roles[3] ); Assert.AreEqual( "terseLabel", roles[4] ); Assert.AreEqual( "totalLabel", roles[5] ); }
[Test] public void GAAP_GetLabelRoles() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load(US_GAAP_FILE); int errors = 0; ArrayList roles = s.GetLabelRoles(false, out errors); Assert.AreEqual(0, errors); Assert.AreEqual(6, roles.Count); Assert.AreEqual("documentation", roles[0]); Assert.AreEqual("label", roles[1]); Assert.AreEqual("periodEndLabel", roles[2]); Assert.AreEqual("periodStartLabel", roles[3]); Assert.AreEqual("terseLabel", roles[4]); Assert.AreEqual("totalLabel", roles[5]); }
[Test] public void ifrs_GetDependantTaxonomies() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); int errors = 0; if (!s.Load(IFRS_FILE, out errors)) { Assert.Fail((string)s.ErrorList[0]); } errors = 0; ArrayList imps = s.GetDependantTaxonomies(false, out errors); Assert.AreEqual(0, errors, "error list not 0"); Assert.AreEqual(0, imps.Count, "wrong number of imports returned"); }
[Test] public void GAAP_TestTuples() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); int errors = 0; s.Load(US_GAAP_FILE); s.Parse(out errors); IDictionaryEnumerator enumer = s.allElements.GetEnumerator(); Console.WriteLine("Found Tuple Elements: "); while (enumer.MoveNext()) { RecurseElementsForTuples(enumer.Value as Element); } }
public void GAAP_BindElements() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); int errors = 0; s.Load( US_GAAP_FILE ); Presentation p = s.LoadPresentationSchema( out errors ); Assert.AreEqual( 22, 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( 5, errors, "bind elements failed" ); }
public void GAAP_GetDependantTaxonomies() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); int errors = 0; if ( !s.Load( US_GAAP_FILE, out errors ) ) { Assert.Fail( (string)s.ErrorList[0]); } errors = 0; ArrayList imps = s.GetDependantTaxonomies( false, out errors ); Assert.AreEqual( 0, errors, "error list not 0" ); Assert.AreEqual( 1, imps.Count, "wrong number of imports returned" ); #if AUTOMATED Assert.AreEqual( @"q:\MAX\axe\XBRLParser\TestSchemas\XBRL 2.1 Updated\2004-06-15\usfr-pt-2004-06-15.xsd", imps[0] ); #else Assert.AreEqual( @"c:\Aucent\MAX\axe\XBRLParser\TestSchemas\XBRL 2.1 Updated\2004-06-15\usfr-pt-2004-06-15.xsd", imps[0] ); #endif }
public void SAG_GetLinkbaseRef_Presentation() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load( SAG_FILE); string labelRef = s.GetLinkbaseReference( TestTaxonomy_2004_06_15.TARGET_LINKBASE_URI + TestTaxonomy_2004_06_15.PRESENTATION_ROLE ); Assert.AreEqual( "blue", labelRef ); }
public void PT_LoadPresentationSchema() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load( PT_GAAP_FILE); int errors = 0; Presentation p = s.LoadPresentationSchema( out errors ); Assert.IsNotNull( p ); Assert.AreEqual( 4, errors ); }
public void ifrs_BindElements() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); int errors = 0; s.Load( IFRS_FILE ); Presentation p = s.LoadPresentationSchema( out errors ); Assert.AreEqual( 144, errors, "load presentation failed" ); s.presentationInfo = p.PresentationLinks; s.LoadElements( out errors ); Assert.AreEqual( 5, errors, "load elements failed" ); //MIN missing sometimes, maxOccurs do not exist s.BindElements( new BindElementDelegate( s.BindElementToLocator ), out errors ); Assert.AreEqual( 0, errors, "bind elements failed" ); }
public void ifrs_GetLabelRoles() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load( IFRS_FILE ); int errors = 0; ArrayList roles = s.GetLabelRoles( false, out errors ); Assert.AreEqual( 0, errors ); Assert.AreEqual( 5, roles.Count ); Assert.AreEqual( "documentation", roles[0] ); Assert.AreEqual( "label", roles[1] ); Assert.AreEqual( "periodEndLabel", roles[2] ); Assert.AreEqual( "periodStartLabel", roles[3] ); Assert.AreEqual( "restated", roles[4] ); }
public void ifrs_LoadImportsAndBind() { //Trace.Listeners.Add( new TextWriterTraceListener(Console.Out) ); TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); 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( 144, errors, "wrong number of load presentation errors" ); errors = 0; s.LoadElements( out errors ); Assert.AreEqual( 5, errors, "wrong number of load element errors" ); 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.BindElements( new BindElementDelegate( s.BindElementToLocator ), out errors ); Assert.AreEqual( 0, errors, "wrong number of bind errors" ); // accounting policies is defined in the usfr-pt schema Assert.IsTrue( s.allElements.ContainsKey( "OtherLiabilitiesPolicy" ) ); //Trace.Listeners.Clear(); }
public void PT_ReadElements() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load( PT_GAAP_FILE); int errors = 0; Presentation p = s.LoadPresentationSchema( out errors ); Assert.AreEqual( 4, errors, "load presentation failed" ); s.presentationInfo = p.PresentationLinks; s.LoadElements( out errors ); Assert.AreEqual( 0, errors, "load elements failed" ); }
public void PT_TargetNamespace() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load( PT_GAAP_FILE); s.GetTargetNamespace(); Assert.AreEqual( "http://www.xbrl.org/taxonomy/us/fr/common/pt/usfr-pt-2004-06-15", s.targetNamespace ); }
public void PT_BindElements() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); DateTime start = DateTime.Now; s.Load( PT_GAAP_FILE); int errors = 0; DateTime startPres = DateTime.Now; Presentation p = s.LoadPresentationSchema( out errors ); DateTime endPres = DateTime.Now; Assert.AreEqual( 4, errors, "load presentation failed" ); s.presentationInfo = p.PresentationLinks; DateTime startElems = DateTime.Now; s.LoadElements( out errors ); DateTime endElems = DateTime.Now; Assert.AreEqual( 0, errors, "load elements failed" ); DateTime startBind = DateTime.Now; s.BindElements( new BindElementDelegate( s.BindElementToLocator ), out errors ); DateTime endBind = DateTime.Now; Console.WriteLine( "Total Time: {0}", endBind-start ); Console.WriteLine( "Read Presentation {0}", endPres-startPres ); Console.WriteLine( "Read Elements {0}", endElems-startElems ); Console.WriteLine( "Bind Elements {0}", endBind-startBind ); Assert.AreEqual( 936, errors, "bind elements failed" ); }
public void PT_BindLabelsToElements() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); int errors = 0; s.Load( PT_GAAP_FILE); errors = 0; Presentation p = s.LoadPresentationSchema( out errors ); Assert.AreEqual( 4, 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( 936, errors, "bind elements failed" ); errors = 0; s.LoadLabels( out errors ); Assert.AreEqual( 0, errors, "load labels failed" ); //Trace.Listeners.Add( new TextWriterTraceListener(Console.Out) ); errors = 0; s.BindElements( new BindElementDelegate( s.BindLabelToElement ), out errors ); Assert.AreEqual( 5, errors, "bind labels failure" ); // linkPart_Name, Subparagraph, Number, Paragraph, Chapter, no corresponding label info //Trace.Listeners.Clear(); }
public void PT_GetLinkbaseRef_Presentation() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load( PT_GAAP_FILE); string presRef = s.GetLinkbaseReference( TestTaxonomy_2004_06_15.TARGET_LINKBASE_URI + TestTaxonomy_2004_06_15.PRESENTATION_ROLE ); #if AUTOMATED Assert.AreEqual( @"q:\MAX\axe\XBRLParser\TestSchemas\XBRL 2.1 Updated\2004-06-15\usfr-pt-2004-06-15-presentation.xml", presRef ); #else Assert.AreEqual( @"c:\Aucent\MAX\axe\XBRLParser\TestSchemas\XBRL 2.1 Updated\2004-06-15\usfr-pt-2004-06-15-presentation.xml", presRef ); #endif }
public void SAG_TargetNamespace() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load( SAG_FILE); s.GetTargetNamespace(); Assert.IsNull( s.targetNamespace ); }
public void PT_GetSupportedLanguages() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load( PT_GAAP_FILE); int errors = 0; ArrayList langs = s.GetSupportedLanguages( false, out errors ); Assert.AreEqual( 0, errors ); Assert.AreEqual( 1, langs.Count ); Assert.AreEqual( "en", langs[0] ); }
public void GAAP_Test_GetNodesByPresentation() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.CurrentLabelRole = "label"; s.CurrentLanguage = "en"; s.Load( US_GAAP_FILE); int errors = 0; s.Parse( out errors ); ArrayList nodeList = s.GetNodesByPresentation(); Assert.IsNotNull( nodeList ); Assert.AreEqual( 5, nodeList.Count ); Console.WriteLine( "Nodes By Presentation: " ); foreach (Node n in nodeList ) { Console.WriteLine( TestNode.ToXml( 0, n ) ); } }
public void PT_LoadLabels() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load( PT_GAAP_FILE ); int errors = 0; s.LoadLabels( out errors ); Assert.AreEqual( 0, errors ); Assert.AreEqual( 1478, s.labelTable.Count ); }
public void ifrs_Parse() { //Trace.Listeners.Add( new TextWriterTraceListener(Console.Out) ); TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); int errors = 0; DateTime start = DateTime.Now; if ( s.Load( IFRS_FILE, out errors ) != true ) { Assert.Fail( (string)s.ErrorList[0]); } errors = 0; s.Parse( out errors ); DateTime end = DateTime.Now; Console.WriteLine( "Parse Time: {0}", end-start ); TimeSpan level = new TimeSpan( 0, 0, 0, 10, 0 ); // 10 seconds to parse Assert.IsTrue( level > (end-start), "Parse takes too long" ); PresentationLink pl = s.presentationInfo["Accounting Policies"] as PresentationLink; Assert.IsNotNull( pl ); }
public void ifrs_LoadSchema() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); int errors = 0; Assert.AreEqual( true, s.Load( IFRS_FILE, out errors ), "Could not load US GAAP File" ); }
public void PT_Parse() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load( PT_GAAP_FILE ); int errors = 0; s.Parse( out errors ); Assert.AreEqual( 1898, errors ); }
public void ifrs_LoadPresentationSchema() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); int errors = 0; if ( s.Load( IFRS_FILE, out errors ) != true ) { Assert.Fail( (string)s.ErrorList[0] ); } errors = 0; Presentation p = s.LoadPresentationSchema( out errors ); Assert.IsNotNull( p ); Assert.AreEqual( 144, errors ); }
public void ifrs_Test_VerifyTuples() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.CurrentLabelRole = "label"; s.CurrentLanguage = "en"; s.Load( IFRS_FILE); int errors = 0; s.Parse( out errors ); ArrayList nodeList = s.GetNodesByElement(); Assert.IsNotNull( nodeList ); Assert.AreEqual( 2591, nodeList.Count ); Console.WriteLine( "Found Tuple Nodes: " ); foreach (Node n in nodeList ) { RecurseVerifyTuples( n ); } }
public void ifrs_TestTuples() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); int errors = 0; s.Load( IFRS_FILE ); s.Parse( out errors ); if (s.boundElements != null) { IDictionaryEnumerator enumer = s.boundElements.GetEnumerator(); Console.WriteLine( "Found Tuple Elements: " ); while ( enumer.MoveNext() ) { RecurseElementsForTuples( enumer.Value as Element ); } } }
public void ifrs_TargetNamespace() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load( IFRS_FILE); s.GetTargetNamespace(); Assert.AreEqual( "http://xbrl.iasb.org/int/fr/ifrs/gp/2004-06-15", s.targetNamespace ); }
public void ifrs_GetLinkbaseRef_Presentation() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); int errors = 0; Assert.AreEqual( true, s.Load( IFRS_FILE, out errors ), "Could not load US IFRS File" ); string presRef = s.GetLinkbaseReference( TestTaxonomy_2004_06_15.TARGET_LINKBASE_URI + TestTaxonomy_2004_06_15.PRESENTATION_ROLE ); #if AUTOMATED Assert.AreEqual( @"q:\MAX\axe\XBRLParser\TestSchemas\ifrs\ifrs-gp-2004-06-15-presentation.xml", presRef ); #else Assert.AreEqual( @"C:\AUCENT\MAX\AXE\XBRLParser\TestSchemas\ifrs\ifrs-gp-2004-06-15-presentation.xml", presRef ); #endif }
public void SAG_LoadSchema() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load( SAG_FILE); }
public void ifrs_GetDependantTaxonomies() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); int errors = 0; if ( !s.Load( IFRS_FILE, out errors ) ) { Assert.Fail( (string)s.ErrorList[0]); } errors = 0; ArrayList imps = s.GetDependantTaxonomies( false, out errors ); Assert.AreEqual( 0, errors, "error list not 0" ); Assert.AreEqual( 0, imps.Count, "wrong number of imports returned" ); }
public void ifrs_ReadElements() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); int errors = 0; s.Load( IFRS_FILE ); int numElements = s.LoadElements( out errors ); Assert.AreEqual( 5, errors ); Assert.AreEqual( 2591, s.allElements.Count ); }
public void PT_OutputTaxonomy() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load( PT_GAAP_FILE); int errors = 0; s.Parse( out errors ); #if !AUTOMATED using ( StreamWriter sw = new StreamWriter( PT_OUT_FILE ) ) { sw.Write( s.ToXmlString() ); } #endif }
public void PT_LoadSchema() { TestTaxonomy_2004_06_15 s = new TestTaxonomy_2004_06_15(); s.Load( PT_GAAP_FILE); }