Example #1
0
        private void assertStringValue(AttributeValue attr, string value)
        {
            Assert.IsInstanceOfType(attr.getValue(), typeof(PrimitiveObjectBlock));
            PrimitiveObjectBlock pob = (PrimitiveObjectBlock)attr.getValue();

            Assert.IsInstanceOfType(pob.getSimpleValue(), typeof(StringValue));
            StringValue str = (StringValue)pob.getSimpleValue();

            Assert.AreEqual(str.getValue(), value);
        }
Example #2
0
        private void assertDurationValue(AttributeValue attr, string value)
        {
            Assert.IsInstanceOfType(attr.getValue(), typeof(PrimitiveObjectBlock));
            PrimitiveObjectBlock pob = (PrimitiveObjectBlock)attr.getValue();

            Assert.IsInstanceOfType(pob.getSimpleValue(), typeof(DurationValue));
            DurationValue actual   = (DurationValue)pob.getSimpleValue();
            DvDuration    expected = new DvDuration(value);

            Assert.AreEqual(actual.getValue(), expected);
        }
Example #3
0
        private void assertRealValue(AttributeValue attr, double value)
        {
            Assert.IsInstanceOfType(attr.getValue(), typeof(PrimitiveObjectBlock));
            PrimitiveObjectBlock pob = (PrimitiveObjectBlock)attr.getValue();

            Assert.IsInstanceOfType(pob.getSimpleValue(), typeof(RealValue));
            RealValue actual = (RealValue)pob.getSimpleValue();

            java.lang.Double expected = new java.lang.Double(value);
            Assert.AreEqual(actual.getValue(), expected);
        }
Example #4
0
        private void assertBooleanValue(AttributeValue attr, bool value)
        {
            Assert.IsInstanceOfType(attr.getValue(), typeof(PrimitiveObjectBlock));
            PrimitiveObjectBlock pob = (PrimitiveObjectBlock)attr.getValue();

            Assert.IsInstanceOfType(pob.getSimpleValue(), typeof(BooleanValue));
            BooleanValue actual = (BooleanValue)pob.getSimpleValue();

            java.lang.Boolean expected = new java.lang.Boolean(value);
            Assert.AreEqual(actual.getValue(), expected);
        }
Example #5
0
        private void assertIntegerValue(AttributeValue attr, int value)
        {
            Assert.IsInstanceOfType(attr.getValue(), typeof(PrimitiveObjectBlock));
            PrimitiveObjectBlock pob = (PrimitiveObjectBlock)attr.getValue();

            Assert.IsInstanceOfType(pob.getSimpleValue(), typeof(IntegerValue));
            IntegerValue actual   = (IntegerValue)pob.getSimpleValue();
            Integer      expected = new Integer(value);

            Assert.AreEqual(actual.getValue(), expected);
        }