コード例 #1
0
ファイル: TestMeasure.cs プロジェクト: plamikcho/xbrlpoc
        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 );
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #6
0
ファイル: TestMeasure.cs プロジェクト: plamikcho/xbrlpoc
        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 );
        }
コード例 #7
0
ファイル: TestMeasure.cs プロジェクト: plamikcho/xbrlpoc
        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 );
        }
コード例 #8
0
ファイル: TestMeasure.cs プロジェクト: plamikcho/xbrlpoc
        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 );
        }