use of com.enonic.xp.data.Value in project xp by enonic.
the class ContentSelectorTypeTest method testCreateProperty.
@Test
public void testCreateProperty() {
final InputTypeConfig config = InputTypeConfig.create().build();
final Value value = this.type.createValue(ValueFactory.newString("name"), config);
assertNotNull(value);
assertSame(ValueTypes.REFERENCE, value.getType());
}
use of com.enonic.xp.data.Value in project xp by enonic.
the class ContentTypeFilterTypeTest method testCreateProperty.
@Test
public void testCreateProperty() {
final InputTypeConfig config = InputTypeConfig.create().build();
final Value value = this.type.createValue(ValueFactory.newString("name"), config);
assertNotNull(value);
assertSame(ValueTypes.STRING, value.getType());
}
use of com.enonic.xp.data.Value in project xp by enonic.
the class CustomSelectorTypeTest method testCreateProperty.
@Test
public void testCreateProperty() {
final InputTypeConfig config = InputTypeConfig.create().build();
final Value value = this.type.createValue(ValueFactory.newString("name"), config);
assertNotNull(value);
assertSame(ValueTypes.STRING, value.getType());
}
use of com.enonic.xp.data.Value in project xp by enonic.
the class CustomSelectorTypeTest method testCreateDefaultValue.
@Test
public void testCreateDefaultValue() {
final Input input = getDefaultInputBuilder(InputTypeName.CUSTOM_SELECTOR, "testValue").build();
final Value value = this.type.createDefaultValue(input);
assertNotNull(value);
assertEquals("testValue", value.toString());
}
use of com.enonic.xp.data.Value in project xp by enonic.
the class DateTimeTypeTest method testCreateDefaultValue_withTimezone_format2_plus.
@Test
public void testCreateDefaultValue_withTimezone_format2_plus() {
final Input input = getDefaultInputBuilder(InputTypeName.DATE_TIME, "2014-08-16T10:03:45+03:00").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-16T07:03:45Z");
}
Aggregations