You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2014/10/04 14:31:45 UTC
[10/12] git commit: ISIS-913: fixes for tests to pass.
ISIS-913: fixes for tests to pass.
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/7c19372d
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/7c19372d
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/7c19372d
Branch: refs/heads/master
Commit: 7c19372de554e5a587b5c12171b8718922e6f637
Parents: 73bbad6
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sat Oct 4 12:18:23 2014 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Sat Oct 4 12:18:23 2014 +0100
----------------------------------------------------------------------
.../apache/isis/core/integtestsupport/legacy/IsisTestRunner.java | 2 +-
.../java/org/apache/isis/core/runtime/system/DeploymentType.java | 2 +-
.../standard/exploration/ExplorationAuthenticatorTest.java | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/7c19372d/core/integtestsupport/src/main/java/org/apache/isis/core/integtestsupport/legacy/IsisTestRunner.java
----------------------------------------------------------------------
diff --git a/core/integtestsupport/src/main/java/org/apache/isis/core/integtestsupport/legacy/IsisTestRunner.java b/core/integtestsupport/src/main/java/org/apache/isis/core/integtestsupport/legacy/IsisTestRunner.java
index 7319f93..cdd1170 100644
--- a/core/integtestsupport/src/main/java/org/apache/isis/core/integtestsupport/legacy/IsisTestRunner.java
+++ b/core/integtestsupport/src/main/java/org/apache/isis/core/integtestsupport/legacy/IsisTestRunner.java
@@ -91,7 +91,7 @@ public class IsisTestRunner extends JUnit4ClassRunner {
try {
// init the system; cf similar code in Isis and
// IsisServletContextInitializer
- final DeploymentType deploymentType = DeploymentType.SERVER_PROTOTYPE;
+ final DeploymentType deploymentType = DeploymentType.UNIT_TESTING;
// TODO: replace with regular IsisSystem and remove this subclass.
system = new IsisSystemUsingInstallersWithinJunit(deploymentType, installerLookup, testClass);
http://git-wip-us.apache.org/repos/asf/isis/blob/7c19372d/core/runtime/src/main/java/org/apache/isis/core/runtime/system/DeploymentType.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/DeploymentType.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/DeploymentType.java
index 693f470..e92b5ff 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/DeploymentType.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/DeploymentType.java
@@ -61,7 +61,7 @@ public class DeploymentType implements DeploymentCategoryProvider {
public static DeploymentType SERVER = new DeploymentType("SERVER", DeploymentCategory.PRODUCTION, ContextCategory.THREADLOCAL);
public static DeploymentType SERVER_EXPLORATION = new DeploymentType("SERVER_EXPLORATION", DeploymentCategory.EXPLORING, ContextCategory.THREADLOCAL);
public static DeploymentType SERVER_PROTOTYPE = new DeploymentType("SERVER_PROTOTYPE", DeploymentCategory.PROTOTYPING, ContextCategory.THREADLOCAL);
- public static DeploymentType UNIT_TESTING = new DeploymentType("UNIT_TESTING", DeploymentCategory.EXPLORING, ContextCategory.STATIC);
+ public static DeploymentType UNIT_TESTING = new DeploymentType("UNIT_TESTING", DeploymentCategory.PRODUCTION, ContextCategory.STATIC_RELAXED);
public static DeploymentType UTILITY = new DeploymentType("UTILITY", DeploymentCategory.EXPLORING, ContextCategory.STATIC);
/**
http://git-wip-us.apache.org/repos/asf/isis/blob/7c19372d/core/runtime/src/test/java/org/apache/isis/core/runtime/authentication/standard/exploration/ExplorationAuthenticatorTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/isis/core/runtime/authentication/standard/exploration/ExplorationAuthenticatorTest.java b/core/runtime/src/test/java/org/apache/isis/core/runtime/authentication/standard/exploration/ExplorationAuthenticatorTest.java
index 6ce0796..9bd8cdd 100644
--- a/core/runtime/src/test/java/org/apache/isis/core/runtime/authentication/standard/exploration/ExplorationAuthenticatorTest.java
+++ b/core/runtime/src/test/java/org/apache/isis/core/runtime/authentication/standard/exploration/ExplorationAuthenticatorTest.java
@@ -98,7 +98,7 @@ public class ExplorationAuthenticatorTest {
mockery.checking(new Expectations() {
{
allowing(mockConfiguration).getString(SystemConstants.DEPLOYMENT_TYPE_KEY);
- will(returnValue(DeploymentType.UNIT_TESTING.name()));
+ will(returnValue(DeploymentType.SERVER_PROTOTYPE.name()));
}
});
assertThat(authenticator.isValid(explorationRequest), is(false));
@@ -120,7 +120,7 @@ public class ExplorationAuthenticatorTest {
mockery.checking(new Expectations() {
{
allowing(mockConfiguration).getString(SystemConstants.DEPLOYMENT_TYPE_KEY);
- will(returnValue(DeploymentType.UNIT_TESTING.name()));
+ will(returnValue(DeploymentType.SERVER_PROTOTYPE.name()));
}
});
assertThat(authenticator.canAuthenticate(someOtherRequest.getClass()), is(false));