LOG.error("Error in accessing field, Caused by:" + e.getMessage()); throw new LuceneIndexingException("Error in accessing field:" + field.getName(), e);
/** * Test method for * {@link com.impetus.kundera.property.accessor.EnumAccessor#fromString(java.lang.String)} * . */ @Test public void testGetInstance() { try { Day d = (Day) accessor.getInstance(Day.class); Assert.assertNull(d); } catch (PropertyAccessException e) { Assert.fail(e.getMessage()); } } }
log.info(exp.getMessage() + ". Possible case of entity column in a super column family. Will be treated as a super column.");
/** * Test method for * {@link com.impetus.kundera.property.accessor.EnumAccessor#toBytes(java.lang.Object)} * . */ @Test public void testToBytes() { try { byte[] b = accessor.toBytes(day1); String s = new String(b, Constants.ENCODING); Assert.assertEquals(day1.MONDAY.name(), s); b = accessor.toBytes(null); Assert.assertNull(b); } catch (PropertyAccessException e) { Assert.fail(e.getMessage()); } catch (UnsupportedEncodingException e) { Assert.fail(e.getMessage()); } }
log.info(exp.getMessage() + ". Possible case of entity column in a super column family. Will be treated as a super column.");
LOG.error("Error in accessing field, Caused by:" + e.getMessage()); throw new LuceneIndexingException("Error in creating indexes on associated columns", e);
/** * Test method for * {@link com.impetus.kundera.property.accessor.EnumAccessor#fromBytes(byte[])} * . */ @Test public void testFromBytes() { try { byte[] b = day1.name().getBytes(Constants.ENCODING); Day dd = (Day) accessor.fromBytes(Day.class, b); Assert.assertEquals(day1, dd); Object o = accessor.fromBytes(Day.class, null); Assert.assertNull(o); } catch (UnsupportedEncodingException e) { Assert.fail(e.getMessage()); } catch (PropertyAccessException e) { Assert.fail(e.getMessage()); } }
/** * Test method for * {@link com.impetus.kundera.property.accessor.EnumAccessor#fromString(java.lang.String)} * . */ @Test public void testGetCopy() { try { Day day = Day.MONDAY; Day d = (Day) accessor.getCopy(day); Assert.assertNotNull(d); Assert.assertTrue(day.equals(d)); d = (Day) accessor.getCopy(null); Assert.assertNull(d); } catch (PropertyAccessException e) { Assert.fail(e.getMessage()); } }
/** * Test method for * {@link com.impetus.kundera.property.accessor.EnumAccessor#fromString(java.lang.String)} * . */ @Test public void testFromString() { try { Day day11 = (Day) accessor.fromString(Day.class, day1.name()); Assert.assertEquals(day1, day11); Day day22 = (Day) accessor.fromString(Day.class, day2.name()); Assert.assertEquals(day2, day22); Day day = (Day) accessor.fromString(Day.class, null); Assert.assertNull(day); day = (Day) accessor.fromString(null, day1.name()); Assert.assertNull(day); day = (Day) accessor.fromString(null, null); Assert.assertNull(day); } catch (PropertyAccessException e) { Assert.fail(e.getMessage()); } }
log.info(exp.getMessage() + ". Possible case of entity column in a super column family. Will be treated as a super column.");
log.info(exp.getMessage() + ". Possible case of entity column in a super column family. Will be treated as a super column.");