[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 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][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 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][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][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(); }
[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 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_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_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_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 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 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(); }