use of com.enonic.xp.data.Value in project xp by enonic.
the class HtmlAreaTypeTest method testCreateProperty.
@Test
public void testCreateProperty() {
final InputTypeConfig config = InputTypeConfig.create().build();
final Value value = this.type.createValue(ValueFactory.newString("test"), config);
assertNotNull(value);
assertSame(ValueTypes.STRING, value.getType());
}
use of com.enonic.xp.data.Value in project xp by enonic.
the class RadioButtonTypeTest method testCreateDefaultValue.
@Test
public void testCreateDefaultValue() {
final Input input = getDefaultInputBuilder(InputTypeName.RADIO_BUTTON, "testOption").build();
final Value value = this.type.createDefaultValue(input);
assertNotNull(value);
assertEquals("testOption", value.toString());
}
use of com.enonic.xp.data.Value in project xp by enonic.
the class TagTypeTest method testCreateProperty.
@Test
public void testCreateProperty() {
final InputTypeConfig config = InputTypeConfig.create().build();
final Value value = this.type.createValue(ValueFactory.newString("test"), config);
assertNotNull(value);
assertSame(ValueTypes.STRING, value.getType());
}
use of com.enonic.xp.data.Value in project xp by enonic.
the class TextAreaTypeTest method testCreateDefaultValue.
@Test
public void testCreateDefaultValue() {
final Input input = getDefaultInputBuilder(InputTypeName.TEXT_AREA, "testString").build();
final Value value = this.type.createDefaultValue(input);
assertNotNull(value);
assertEquals("testString", value.toString());
}
use of com.enonic.xp.data.Value in project xp by enonic.
the class DateTimeTypeTest method testCreateDefaultValue_withTimezone_format1.
@Test
public void testCreateDefaultValue_withTimezone_format1() {
final Input input = getDefaultInputBuilder(InputTypeName.DATE_TIME, "2014-08-16T10:03:45Z").inputTypeConfig(InputTypeConfig.create().property(InputTypeProperty.create("timezone", "true").build()).build()).build();
final Value value = this.type.createDefaultValue(input);
assertNotNull(value);
assertSame(ValueTypes.DATE_TIME, value.getType());
assertEquals(value.toString(), "2014-08-16T10:03:45Z");
}
Aggregations