use of org.commonjava.indy.autoprox.rest.dto.CatalogDTO in project indy by Commonjava.
the class CreateRuleAndVerifyInListingTest method createRuleAndVerifyListingReflectsIt.
@Test
public void createRuleAndVerifyListingReflectsIt() throws Exception {
final CatalogDTO catalog = module.getCatalog();
assertThat(catalog.isEnabled(), equalTo(true));
assertThat(catalog.getRules().isEmpty(), equalTo(true));
final RuleDTO rule = getRule("0001-simple-rule", "rules/simple-rule.groovy");
final RuleDTO dto = module.storeRule(rule);
assertThat(dto, notNullValue());
final CatalogDTO resultCatalog = module.getCatalog();
final List<RuleDTO> rules = resultCatalog.getRules();
assertThat(rules.size(), equalTo(1));
assertThat(rules.get(0), equalTo(dto));
}
Aggregations