Changed FilterInvocationDefinitionSourceEditor to complain if the parsed URL or the config attribute is empty or null. Plus some comment tidying.

This commit is contained in:
Luke Taylor
2006-01-04 21:35:10 +00:00
parent e3696e697b
commit f9d0ee209b
3 changed files with 22 additions and 6 deletions

View File

@@ -223,4 +223,14 @@ public class FilterInvocationDefinitionSourceEditorWithPathsTests
.getValue();
assertEquals(2, map.getMapSize());
}
public void testInvalidNameValueFailsToParse() {
FilterInvocationDefinitionSourceEditor editor = new FilterInvocationDefinitionSourceEditor();
try {
// Use a "==" instead of an "="
editor.setAsText(" PATTERN_TYPE_APACHE_ANT\r\n /secure/*==ROLE_SUPERVISOR,ROLE_TELLER \r\n");
fail("Shouldn't be able to use '==' for config attribute.");
} catch(IllegalArgumentException expected) {
}
}
}