use of org.apache.jackrabbit.spi.QValue in project jackrabbit by apache.
the class QValueTest method testPathValueType.
public void testPathValueType() throws IOException, RepositoryException {
QValue v = factory.create(ROOT_PATH);
assertTrue(v.getType() == PropertyType.PATH);
v = factory.create(ROOT_PATH.toString(), PropertyType.PATH);
assertTrue(v.getType() == PropertyType.PATH);
}
use of org.apache.jackrabbit.spi.QValue in project jackrabbit by apache.
the class QValueTest method testGetDecimalOnBooleanValue.
public void testGetDecimalOnBooleanValue() throws RepositoryException {
try {
QValue v = factory.create(true);
v.getDecimal();
fail("'true' cannot be converted to a valid decimal value.");
} catch (ValueFormatException e) {
// ok
}
}
use of org.apache.jackrabbit.spi.QValue in project jackrabbit by apache.
the class QValueTest method testNameValueEquality.
public void testNameValueEquality() throws IOException, RepositoryException {
QValue v = factory.create(NameConstants.JCR_DATA);
QValue v2 = factory.create(NameConstants.JCR_DATA.toString(), PropertyType.NAME);
assertTrue(v.equals(v2));
}
use of org.apache.jackrabbit.spi.QValue in project jackrabbit by apache.
the class QValueTest method testEqualityDifferentTypes.
public void testEqualityDifferentTypes() throws RepositoryException {
QValue v = factory.create(REFERENCE, PropertyType.REFERENCE);
QValue v2 = factory.create(REFERENCE, PropertyType.STRING);
assertFalse(v.equals(v2));
}
use of org.apache.jackrabbit.spi.QValue in project jackrabbit by apache.
the class QValueTest method testNameValueGetName.
public void testNameValueGetName() throws RepositoryException {
QValue v = factory.create(NameConstants.JCR_DATA);
assertTrue(v.getName().equals(NameConstants.JCR_DATA));
}
Aggregations