Exemplo n.º 1
0
        public void Test_4217_Bad()
        {
            TestMeasure tm = new TestMeasure();
            tm.MeasureValue = "USD";
            tm.MeasureNamespace = "bad";
            tm.MeasureSchema = DocumentBase.XBRL_INSTANCE_URL;

            ArrayList errors = new ArrayList();

            Assert.IsFalse( tm.Validate( errors ) );
            Assert.IsNotNull( errors );
            Assert.AreEqual( 1, errors.Count );
        }
Exemplo n.º 2
0
        public void Test_4217_Good()
        {
            TestMeasure tm = new TestMeasure();

            tm.MeasureValue     = "USD";
            tm.MeasureNamespace = "iso4217";
            tm.MeasureSchema    = "http://www.xbrl.org/2003/iso4217";

            ArrayList errors = new ArrayList();

            Assert.IsTrue(tm.Validate(errors));
            Assert.IsNotNull(errors);
            Assert.AreEqual(0, errors.Count);
        }
Exemplo n.º 3
0
        public void Test_4217_Bad()
        {
            TestMeasure tm = new TestMeasure();

            tm.MeasureValue     = "USD";
            tm.MeasureNamespace = "bad";
            tm.MeasureSchema    = DocumentBase.XBRL_INSTANCE_URL;

            ArrayList errors = new ArrayList();

            Assert.IsFalse(tm.Validate(errors));
            Assert.IsNotNull(errors);
            Assert.AreEqual(1, errors.Count);
        }
Exemplo n.º 4
0
        public void Test_Instance_Pure()
        {
            TestMeasure tm = new TestMeasure();

            tm.MeasureValue     = "pure";
            tm.MeasureNamespace = "blah";
            tm.MeasureSchema    = "http://www.xbrl.org/2003/instance";

            ArrayList errors = new ArrayList();

            Assert.IsTrue(tm.Validate(errors));
            Assert.IsNotNull(errors);
            Assert.AreEqual(0, errors.Count);
        }
Exemplo n.º 5
0
        public void Test_Instance_SharesWithNoNamespace()
        {
            TestMeasure tm = new TestMeasure();

            tm.MeasureValue     = "shares";
            tm.MeasureNamespace = "";
            tm.MeasureSchema    = "http://www.xbrl.org/2003/instance";

            ArrayList errors = new ArrayList();

            bool   valid = tm.Validate(errors);
            string msg   = null;

            if (!valid)
            {
                msg = ((ParserMessage)errors[0]).Message;
            }

            Assert.IsTrue(valid, msg);
            Assert.IsNotNull(errors);
            Assert.AreEqual(0, errors.Count);
        }
Exemplo n.º 6
0
        public void Test_Instance_SharesWithNoNamespace()
        {
            TestMeasure tm = new TestMeasure();
            tm.MeasureValue = "shares";
            tm.MeasureNamespace = "";
            tm.MeasureSchema = "http://www.xbrl.org/2003/instance";

            ArrayList errors = new ArrayList();

            bool valid = tm.Validate( errors );
            string msg = null;

            if ( !valid )
            {
                msg = ((ParserMessage)errors[0]).Message;
            }

            Assert.IsTrue( valid, msg );
            Assert.IsNotNull( errors );
            Assert.AreEqual( 0, errors.Count );
        }
Exemplo n.º 7
0
        public void Test_Instance_Pure()
        {
            TestMeasure tm = new TestMeasure();
            tm.MeasureValue = "pure";
            tm.MeasureNamespace = "blah";
            tm.MeasureSchema = "http://www.xbrl.org/2003/instance";

            ArrayList errors = new ArrayList();

            Assert.IsTrue( tm.Validate( errors ) );
            Assert.IsNotNull( errors );
            Assert.AreEqual( 0, errors.Count );
        }
Exemplo n.º 8
0
        public void Test_4217_Good()
        {
            TestMeasure tm = new TestMeasure();
            tm.MeasureValue = "USD";
            tm.MeasureNamespace = "iso4217";
            tm.MeasureSchema = "http://www.xbrl.org/2003/iso4217";

            ArrayList errors = new ArrayList();

            Assert.IsTrue( tm.Validate(  errors ) );
            Assert.IsNotNull( errors );
            Assert.AreEqual( 0, errors.Count );
        }