public void testPathValueGetString() throws IOException, RepositoryException { QValue v = factory.create(rootPath); assertTrue(v.getString().equals(rootPath.toString())); }
public void testPathValueEquality() throws IOException, RepositoryException { QValue v = factory.create(rootPath); QValue v2 = factory.create(rootPath.toString(), PropertyType.PATH); assertTrue(v.equals(v2)); }
public void testNameValueEquality() throws IOException, RepositoryException { QValue v = factory.create(testName); QValue v2 = factory.create(testName.toString(), PropertyType.NAME); assertTrue(v.equals(v2)); }
public void testNameValueGetString() throws IOException, RepositoryException { QValue v = factory.create(testName); assertTrue(v.getString().equals(testName.toString())); }
public void testReferenceValueType() throws RepositoryException { if (reference != null) { QValue v = factory.create(reference, PropertyType.REFERENCE); assertTrue("Type of a date value must be PropertyType.REFERENCE.", v.getType() == PropertyType.REFERENCE); } else { log.warn("Configuration entry 'QValueFactoryTest.reference' is missing -> skip test 'testReferenceValueType'."); } }
public void testNameValueGetName() throws RepositoryException { QValue v = factory.create(testName); assertTrue(v.getName().equals(testName)); }
public void testPathValueGetPath() throws RepositoryException { QValue v = factory.create(rootPath); assertTrue(v.getPath().equals(rootPath)); }
public void testNameValueType() throws IOException, RepositoryException { QValue v = factory.create(testName); assertTrue(v.getType() == PropertyType.NAME); v = factory.create(testName.toString(), PropertyType.NAME); assertTrue(v.getType() == PropertyType.NAME); }
public void testPathValueType() throws IOException, RepositoryException { QValue v = factory.create(rootPath); assertTrue(v.getType() == PropertyType.PATH); v = factory.create(rootPath.toString(), PropertyType.PATH); assertTrue(v.getType() == PropertyType.PATH); }
public void testBinaryValueType() throws IOException, RepositoryException { QValue v = factory.create(new byte[] {'a', 'b', 'c'}); assertTrue(v.getType() == PropertyType.BINARY); }
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 {
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); }