use of com.canoo.dp.impl.remoting.Converters in project dolphin-platform by canoo.
the class LocalDateTimeConverterFactoryTest method testWrongDolphinValues.
@Test(expectedExceptions = ClassCastException.class)
public void testWrongDolphinValues(@Mocked BeanRepository beanRepository) throws ValueConverterException {
// Given
Converters converters = new Converters(beanRepository);
// When
Converter converter = converters.getConverter(LocalDateTime.class);
// Then
converter.convertFromDolphin(7);
}
use of com.canoo.dp.impl.remoting.Converters in project dolphin-platform by canoo.
the class LocalDateTimeConverterFactoryTest method testWrongBeanValues.
@Test(expectedExceptions = ClassCastException.class)
public void testWrongBeanValues(@Mocked BeanRepository beanRepository) throws ValueConverterException {
// Given
Converters converters = new Converters(beanRepository);
// When
Converter converter = converters.getConverter(LocalDateTime.class);
// Then
converter.convertToDolphin(7);
}
use of com.canoo.dp.impl.remoting.Converters in project dolphin-platform by canoo.
the class LocalDateTimeConverterFactoryTest method testConverterCreation.
@Test
public void testConverterCreation(@Mocked BeanRepository beanRepository) {
// Given
Converters converters = new Converters(beanRepository);
// When
Converter converter = converters.getConverter(LocalDateTime.class);
// Then
assertNotNull(converter);
}
use of com.canoo.dp.impl.remoting.Converters in project dolphin-platform by canoo.
the class LocalDateTimeConverterFactoryTest method testFactoryFieldType.
@Test
public void testFactoryFieldType(@Mocked BeanRepository beanRepository) {
// Given
Converters converters = new Converters(beanRepository);
// When
int type = converters.getFieldType(LocalDateTime.class);
// Then
assertEquals(type, ValueFieldTypes.LOCAL_DATE_TIME_FIELD_TYPE);
}
use of com.canoo.dp.impl.remoting.Converters in project dolphin-platform by canoo.
the class PeriodeConverterFactoryTest method testWrongBeanValues.
@Test(expectedExceptions = ClassCastException.class)
public void testWrongBeanValues(@Mocked BeanRepository beanRepository) throws ValueConverterException {
// Given
Converters converters = new Converters(beanRepository);
// When
Converter converter = converters.getConverter(Period.class);
// Then
converter.convertToDolphin(7);
}
Aggregations