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); }
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); }
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); }
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); }
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); }