assertNotNull(version);
}
@Test
public void testUpdateConfiguration() throws Exception {
Configuration configuration = testee.getConfiguration();
assertNotNull(configuration.getIssueStatuses());
assertEquals(0, configuration.getIssueStatuses().getAll().size());
assertNotNull(configuration.getIssueCategories());
assertEquals(0, configuration.getIssueCategories().getAll().size());
assertNotNull(configuration.getIssuePriorities());
assertEquals(0, configuration.getIssuePriorities().getAll().size());
assertNotNull(configuration.getTrackers());
assertEquals(0, configuration.getTrackers().getAll().size());
assertNotNull(configuration.getCustomFields());
assertEquals(0, configuration.getCustomFields().getAll().size());
assertNotNull(configuration.getUsers());
assertEquals(0, configuration.getUsers().getAll().size());
assertNotNull(configuration.getQueries());
assertEquals(0, configuration.getQueries().getAll().size());
assertNotNull(configuration.getProjects());
assertEquals(0, configuration.getProjects().getAll().size());
assertNotNull(configuration.getVersions());
assertEquals(0, configuration.getVersions().getAll().size());
assertNull(configuration.getSettings());
testee.updateConfiguration(null);
assertNotNull(configuration.getIssueStatuses());
assertEquals(IssueStatusValidator.COUNT, configuration.getIssueStatuses().getAll().size());
assertNotNull(configuration.getIssueCategories());
assertEquals(IssueCategoryValidator.COUNT, configuration.getIssueCategories().getAll().size());
assertNotNull(configuration.getIssuePriorities());
assertEquals(IssuePriorityValidator.COUNT, configuration.getIssuePriorities().getAll().size());
assertNotNull(configuration.getTrackers());
assertEquals(TrackerValidator.COUNT, configuration.getTrackers().getAll().size());
assertNotNull(configuration.getCustomFields());
assertEquals(CustomFieldValidator.COUNT, configuration.getCustomFields().getAll().size());
for (CustomField cf : configuration.getCustomFields().getAll()) {
assertNotNull(cf.getFieldFormat());
if (cf.isFilter()) {
assertNotNull("Missing Query-Field for " + cf.getFieldFormat(), cf.getQueryField());
}
}
assertNotNull(configuration.getUsers());
assertEquals(UserValidator.COUNT, configuration.getUsers().getAll().size());
assertNotNull(configuration.getQueries());
assertEquals(QueryValidator.COUNT, configuration.getQueries().getAll().size());
assertNotNull(configuration.getProjects());
assertEquals(ProjectValidator.COUNT, configuration.getProjects().getAll().size());
assertNotNull(configuration.getVersions());
assertEquals(VersionValidator.COUNT, configuration.getVersions().getAll().size());
assertNotNull(configuration.getSettings());
}