mirror of
https://github.com/apache/struts.git
synced 2026-08-10 17:16:58 +00:00
Fixes tests
This commit is contained in:
+7
-7
@@ -27,12 +27,12 @@ public class XmlConfigurationProviderAllowedMethodsTest extends ConfigurationTes
|
||||
assertEquals(5, actionConfigs.size());
|
||||
|
||||
ActionConfig action = (ActionConfig) actionConfigs.get("Default");
|
||||
assertEquals(1, action.getAllowedMethods().size());
|
||||
assertEquals(0, action.getAllowedMethods().size());
|
||||
assertTrue(action.isAllowedMethod("execute"));
|
||||
assertTrue(action.isAllowedMethod("foo"));
|
||||
assertTrue(action.isAllowedMethod("bar"));
|
||||
assertTrue(action.isAllowedMethod("baz"));
|
||||
assertTrue(action.isAllowedMethod("xyz"));
|
||||
assertFalse(action.isAllowedMethod("foo"));
|
||||
assertFalse(action.isAllowedMethod("bar"));
|
||||
assertFalse(action.isAllowedMethod("baz"));
|
||||
assertFalse(action.isAllowedMethod("xyz"));
|
||||
|
||||
action = (ActionConfig) actionConfigs.get("Boring");
|
||||
assertEquals(0, action.getAllowedMethods().size());
|
||||
@@ -59,7 +59,7 @@ public class XmlConfigurationProviderAllowedMethodsTest extends ConfigurationTes
|
||||
assertFalse(action.isAllowedMethod("xyz"));
|
||||
|
||||
action = (ActionConfig) actionConfigs.get("Baz");
|
||||
assertEquals(2, action.getAllowedMethods().size());
|
||||
assertEquals(3, action.getAllowedMethods().size());
|
||||
assertFalse(action.isAllowedMethod("execute"));
|
||||
assertTrue(action.isAllowedMethod("foo"));
|
||||
assertTrue(action.isAllowedMethod("bar"));
|
||||
@@ -114,7 +114,7 @@ public class XmlConfigurationProviderAllowedMethodsTest extends ConfigurationTes
|
||||
assertFalse(action.isAllowedMethod("xyz"));
|
||||
|
||||
action = (ActionConfig) actionConfigs.get("Baz");
|
||||
assertEquals(2, action.getAllowedMethods().size());
|
||||
assertEquals(3, action.getAllowedMethods().size());
|
||||
assertFalse(action.isAllowedMethod("execute"));
|
||||
assertTrue(action.isAllowedMethod("foo"));
|
||||
assertTrue(action.isAllowedMethod("bar"));
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
</action>
|
||||
</package>
|
||||
|
||||
<package name="strict" strict-method-invocation="true">
|
||||
<package name="strict">
|
||||
<action name="Default">
|
||||
</action>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user