示例#1
0
        public void TestPerformSECValidations_TMP()
        {
            Taxonomy tax = new Taxonomy();

            tax.Load(@"C:\Crossfire Stuff\us-gaap-2011-01-31\us-gaap-2011-01-31\ind\ci\testing.xsd");
            int errors;
            Assert.IsTrue(tax.Parse(out errors), "Failed to parse taxonomy");
            Dictionary<string, bool> eleDt = new Dictionary<string, bool>();
            eleDt.Add("us-gaap_AccountsPayableAndAccruedLiabilities", true);
            eleDt.Add("us-gaap_AccountsPayable",true);
            List<ValidationErrorInfo> outParam = new List<ValidationErrorInfo>();
            tax.PerformSECValidations(null, eleDt, null, false, ref outParam);
        }
示例#2
0
        public void TestPerformSECValidations2()
        {
            Taxonomy tax = new Taxonomy();

            tax.Load(@"S:\TESTSCHEMAS\BEN Taxonomy\ben-20091231.xsd");
            int errors;
            Assert.IsTrue(tax.Parse(out errors), "Failed to parse taxonomy");

            Instance ins = new Instance();
            ArrayList errorsstr;
            Assert.IsTrue(ins.TryLoadInstanceDoc(@"S:\TESTSCHEMAS\BEN Taxonomy\ben-20091231.xml", out errorsstr));

            Dictionary<string, bool> eleDt = new Dictionary<string,bool>();
            List<MarkupProperty> validMarkups = new List<MarkupProperty>();
            foreach (MarkupProperty mp in ins.markups)
            {
                mp.element = new Node( tax.allElements[mp.elementId] as Element);
               eleDt[mp.elementId] = true;

                validMarkups.Add(mp);
            }

            List<ValidationErrorInfo> outParam =  new List<ValidationErrorInfo>();
            tax.PerformSECValidations(validMarkups, eleDt, null, false, ref outParam);
            outParam.Sort();
            foreach( ValidationErrorInfo vei in outParam )
            {
                Console.WriteLine( vei.MyErrorString);
            }
        }
示例#3
0
        public void TestPerformSECValidations3()
        {
            Taxonomy tax = new Taxonomy();

            tax.Load(@"S:\TESTSCHEMAS\EIX Taxonomy\eix.xsd");
            int errors;
            Assert.IsTrue(tax.Parse(out errors), "Failed to parse taxonomy");

            Dictionary<string, bool> eleDt = new Dictionary<string, bool>();
            List<MarkupProperty> validMarkups = new List<MarkupProperty>();

            List<ValidationErrorInfo> outParam = new List<ValidationErrorInfo>();
            tax.PerformSECValidations(validMarkups, eleDt, null, false, ref outParam);
            outParam.Sort();
            foreach (ValidationErrorInfo vei in outParam)
            {
                Console.WriteLine(vei.MyErrorString);
            }
        }
示例#4
0
        public void TestPerformSECValidations1()
        {
            Taxonomy tax = new Taxonomy();

            tax.Load(@"S:\TESTSCHEMAS\FMC Taxonomy\fmc-20090930.xsd");
            int errors;
            Assert.IsTrue(tax.Parse(out errors), "Failed to parse taxonomy");
            Dictionary<string, bool> eleDt = new Dictionary<string,bool>();
            eleDt.Add( "us-gaap_Revenues", true );
            List<ValidationErrorInfo> outParam =  new List<ValidationErrorInfo>();
            tax.PerformSECValidations(null, eleDt, null, false, ref outParam);
        }