From c1928ad06bdfbe245b1ed7d5bfeb07ed9bface37 Mon Sep 17 00:00:00 2001 From: Lukasz Lenart Date: Mon, 31 Aug 2015 18:36:04 +0200 Subject: [PATCH] Fixes tests --- ...XmlConfigurationProviderAllowedMethodsTest.java | 14 +++++++------- .../providers/xwork-test-allowed-methods.xml | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/src/test/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProviderAllowedMethodsTest.java b/core/src/test/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProviderAllowedMethodsTest.java index 6a55e75a8..11f779ac6 100644 --- a/core/src/test/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProviderAllowedMethodsTest.java +++ b/core/src/test/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProviderAllowedMethodsTest.java @@ -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")); diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-allowed-methods.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-allowed-methods.xml index 785140834..4059d6252 100644 --- a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-allowed-methods.xml +++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-allowed-methods.xml @@ -25,7 +25,7 @@ - +