use of com.synopsys.integration.configuration.config.PropertyConfiguration in project synopsys-detect by blackducksoftware.
the class LongPropertiesTests method testValued.
@Test
public void testValued() throws InvalidPropertyException {
ValuedAlikeProperty<Long> property = new LongProperty("long.valued", 2L);
PropertyConfiguration config = configOf(Pair.of("long.valued", "5"));
Assertions.assertEquals(new Long(5L), config.getValue(property));
PropertyTestHelpUtil.assertAllHelpValid(property);
}
use of com.synopsys.integration.configuration.config.PropertyConfiguration in project synopsys-detect by blackducksoftware.
the class PathPropertiesTest method testList.
@Test
public void testList() throws InvalidPropertyException {
ValuedAlikeListProperty<PathValue> property = new PathListProperty("path.list", emptyList());
PropertyConfiguration config = configOf(Pair.of("path.list", "/new/path,/other/new/path"));
Assertions.assertEquals(Bds.listOf(new PathValue("/new/path"), new PathValue("/other/new/path")), config.getValue(property));
PropertyTestHelpUtil.assertAllListHelpValid(property);
}
use of com.synopsys.integration.configuration.config.PropertyConfiguration in project synopsys-detect by blackducksoftware.
the class StringPropertiesTest method testList.
@Test
public void testList() throws InvalidPropertyException {
ValuedAlikeListProperty<String> property = new StringListProperty("string.list", Collections.emptyList());
PropertyConfiguration config = configOf(Pair.of("string.list", "1,2,3,abc"));
Assertions.assertEquals(Bds.listOf("1", "2", "3", "abc"), config.getValue(property));
PropertyTestHelpUtil.assertAllListHelpValid(property);
}
Aggregations