Package org.apache.jackrabbit.spi

Examples of org.apache.jackrabbit.spi.QValue


        assertEquals("Boolean value must be true", Boolean.TRUE.toString(), v.getString());
        assertEquals("Boolean value must be true", true, v.getBoolean());
    }

    public void testCreateFalseBooleanValue() throws RepositoryException {
        QValue v = factory.create(false);
        assertEquals("Boolean value must be false", Boolean.FALSE.toString(), v.getString());
        assertEquals("Boolean value must be false", false, v.getBoolean());
    }
View Full Code Here


        assertEquals("Boolean value must be false", Boolean.FALSE.toString(), v.getString());
        assertEquals("Boolean value must be false", false, v.getBoolean());
    }

    public void testCreateTrueFromString() throws ValueFormatException, RepositoryException {
        QValue v = factory.create(Boolean.TRUE.toString(), PropertyType.STRING);
        assertEquals("Boolean value must be true", true, v.getBoolean());
    }
View Full Code Here

        QValue v = factory.create(Boolean.TRUE.toString(), PropertyType.STRING);
        assertEquals("Boolean value must be true", true, v.getBoolean());
    }

    public void testCreateFalseFromString() throws ValueFormatException, RepositoryException {
        QValue v = factory.create("any", PropertyType.STRING);
        assertEquals("Boolean value must be false", false, v.getBoolean());
    }
View Full Code Here

        assertEquals("Boolean value must be false", false, v.getBoolean());
    }

    public void testReadBooleanAsLong() throws RepositoryException {
        try {
            QValue v = factory.create(true);
            v.getLong();
        }
        catch (ValueFormatException e) {
            return; // ok
        }
        assertTrue("Cannot convert value to long", false);
View Full Code Here

            // ok
        }
    }

    public void testDateValueType() throws RepositoryException {
        QValue v = factory.create(CALENDAR);
        assertTrue("Type of a date value must be PropertyType.DATE", v.getType() == PropertyType.DATE);
    }
View Full Code Here

    public void testDateValueType() throws RepositoryException {
        QValue v = factory.create(CALENDAR);
        assertTrue("Type of a date value must be PropertyType.DATE", v.getType() == PropertyType.DATE);
    }
    public void testDateValueEquality() throws RepositoryException {
        QValue v = factory.create(CALENDAR);
        QValue otherV = factory.create(CALENDAR);
        assertEquals("Equality of date value must be calculated based on their String representation.", v, otherV);
    }
View Full Code Here

        QValue otherV = factory.create(CALENDAR);
        assertEquals("Equality of date value must be calculated based on their String representation.", v, otherV);
    }

    public void testDateValueEquality2() throws RepositoryException {
        QValue v = factory.create(CALENDAR);
        QValue otherV = factory.create(v.getString(), PropertyType.DATE);
        assertEquals("Equality of date value must be calculated based on their String representation.", v, otherV);
    }
View Full Code Here

        QValue otherV = factory.create(v.getString(), PropertyType.DATE);
        assertEquals("Equality of date value must be calculated based on their String representation.", v, otherV);
    }

    public void testDateValueStringRepresentation() throws RepositoryException {
        QValue v = factory.create(CALENDAR);
        String s = ISO8601.format(CALENDAR);
        assertEquals("Expected String representation of date value to be ISO8601 compliant.", s, v.getString());
    }
View Full Code Here

            // ok
        }
    }

    public void testReferenceValueType() throws RepositoryException {
        QValue v = factory.create(REFERENCE, PropertyType.REFERENCE);
        assertTrue("Type of a date value must be PropertyType.REFERENCE.", v.getType() == PropertyType.REFERENCE);
    }
View Full Code Here

        QValue v = factory.create(REFERENCE, PropertyType.REFERENCE);
        assertTrue("Type of a date value must be PropertyType.REFERENCE.", v.getType() == PropertyType.REFERENCE);
    }

    public void testReferenceValueEquality() throws RepositoryException {
        QValue v = factory.create(REFERENCE, PropertyType.REFERENCE);
        QValue otherV = factory.create(REFERENCE, PropertyType.REFERENCE);
        assertEquals("Reference values created from the same string must be equal.", v, otherV);
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.spi.QValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.