use of org.motechproject.mds.domain.TypeSettingOption in project motech by motech.
the class AllTypeSettingsContextIT method assertTypeSetting.
private void assertTypeSetting(List<TypeSetting> typeSettings, String name, List<String> typeSettingOptions, Class<?> typeClass, String defaultValue) {
TypeSetting typeSetting = retrieveByName(typeSettings, name);
assertNotNull("Not found type setting with name: " + name, typeSetting);
assertNotNull("Type setting should have id", typeSetting.getId());
assertEquals(name, typeSetting.getName());
List<TypeSettingOption> options = typeSetting.getTypeSettingOptions();
List<String> optionsNames = new ArrayList<>();
for (TypeSettingOption option : options) {
optionsNames.add(option.getName());
}
assertEquals(typeSettingOptions, optionsNames);
assertEquals(typeClass, typeSetting.getValueType().getTypeClass());
assertEquals(defaultValue, typeSetting.getDefaultValue());
}
Aggregations