Skip to content
Browse files

METRICS-3254(related): Fixed spring-neo4j plugin tests

  • Loading branch information...
1 parent a876dbb commit 5b15c87eeb6d02e1b983ad31a1fdd2fc2c808ec4 @lgoldstein lgoldstein committed
View
29 .../java/com/springsource/insight/plugin/neo4j/AbstractNeo4jCollectionAspectTestSupport.java
@@ -0,0 +1,29 @@
+/**
+ * Copyright (c) 2009-2011 VMware, Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.springsource.insight.plugin.neo4j;
+
+import com.springsource.insight.collection.test.OperationCollectionAspectTestSupport;
+
+/**
+ *
+ */
+public abstract class AbstractNeo4jCollectionAspectTestSupport extends OperationCollectionAspectTestSupport {
+ protected AbstractNeo4jCollectionAspectTestSupport() {
+ super();
+ }
+
+}
View
5 ...rc/test/java/com/springsource/insight/plugin/neo4j/FindOperationCollectionAspectTest.java
@@ -23,13 +23,12 @@
import org.springframework.transaction.annotation.Transactional;
import com.springsource.insight.collection.OperationCollectionAspectSupport;
-import com.springsource.insight.collection.test.OperationCollectionAspectTestSupport;
import com.springsource.insight.intercept.operation.Operation;
@RunWith(SpringJUnit4ClassRunner.class)
-@ContextConfiguration({"/test-context.xml"})
+@ContextConfiguration(OperationCollectionAspectTests.TEST_CONTEXT)
@Transactional
-public class FindOperationCollectionAspectTest extends OperationCollectionAspectTestSupport {
+public class FindOperationCollectionAspectTest extends AbstractNeo4jCollectionAspectTestSupport {
@Autowired
OperationCollectionAspectTests tests;
View
5 ...rc/test/java/com/springsource/insight/plugin/neo4j/InitOperationCollectionAspectTest.java
@@ -23,13 +23,12 @@
import org.springframework.transaction.annotation.Transactional;
import com.springsource.insight.collection.OperationCollectionAspectSupport;
-import com.springsource.insight.collection.test.OperationCollectionAspectTestSupport;
import com.springsource.insight.intercept.operation.Operation;
@RunWith(SpringJUnit4ClassRunner.class)
-@ContextConfiguration({"/test-context.xml"})
+@ContextConfiguration(OperationCollectionAspectTests.TEST_CONTEXT)
@Transactional
-public class InitOperationCollectionAspectTest extends OperationCollectionAspectTestSupport {
+public class InitOperationCollectionAspectTest extends AbstractNeo4jCollectionAspectTestSupport {
@Autowired
OperationCollectionAspectTests tests;
View
5 .../test/java/com/springsource/insight/plugin/neo4j/LookupOperationCollectionAspectTest.java
@@ -23,13 +23,12 @@
import org.springframework.transaction.annotation.Transactional;
import com.springsource.insight.collection.OperationCollectionAspectSupport;
-import com.springsource.insight.collection.test.OperationCollectionAspectTestSupport;
import com.springsource.insight.intercept.operation.Operation;
@RunWith(SpringJUnit4ClassRunner.class)
-@ContextConfiguration({"/test-context.xml"})
+@ContextConfiguration(OperationCollectionAspectTests.TEST_CONTEXT)
@Transactional
-public class LookupOperationCollectionAspectTest extends OperationCollectionAspectTestSupport {
+public class LookupOperationCollectionAspectTest extends AbstractNeo4jCollectionAspectTestSupport {
@Autowired
OperationCollectionAspectTests tests;
View
4 ...j/src/test/java/com/springsource/insight/plugin/neo4j/OperationCollectionAspectTests.java
@@ -30,9 +30,11 @@
import org.springframework.transaction.annotation.Transactional;
@RunWith(SpringJUnit4ClassRunner.class)
-@ContextConfiguration({"/test-context.xml"})
+@ContextConfiguration(OperationCollectionAspectTests.TEST_CONTEXT)
@Transactional
public class OperationCollectionAspectTests {
+ public static final String TEST_CONTEXT="classpath:META-INF/spring-neo4j-plugin-test-context.xml";
+
@Autowired Neo4jTemplate template;
public OperationCollectionAspectTests () {
View
5 ...c/test/java/com/springsource/insight/plugin/neo4j/QueryOperationCollectionAspectTest.java
@@ -23,13 +23,12 @@
import org.springframework.transaction.annotation.Transactional;
import com.springsource.insight.collection.OperationCollectionAspectSupport;
-import com.springsource.insight.collection.test.OperationCollectionAspectTestSupport;
import com.springsource.insight.intercept.operation.Operation;
@RunWith(SpringJUnit4ClassRunner.class)
-@ContextConfiguration({"/test-context.xml"})
+@ContextConfiguration(OperationCollectionAspectTests.TEST_CONTEXT)
@Transactional
-public class QueryOperationCollectionAspectTest extends OperationCollectionAspectTestSupport {
+public class QueryOperationCollectionAspectTest extends AbstractNeo4jCollectionAspectTestSupport {
@Autowired
OperationCollectionAspectTests tests;
View
5 ...est/java/com/springsource/insight/plugin/neo4j/TraverseOperationCollectionAspectTest.java
@@ -23,13 +23,12 @@
import org.springframework.transaction.annotation.Transactional;
import com.springsource.insight.collection.OperationCollectionAspectSupport;
-import com.springsource.insight.collection.test.OperationCollectionAspectTestSupport;
import com.springsource.insight.intercept.operation.Operation;
@RunWith(SpringJUnit4ClassRunner.class)
-@ContextConfiguration({"/test-context.xml"})
+@ContextConfiguration(OperationCollectionAspectTests.TEST_CONTEXT)
@Transactional
-public class TraverseOperationCollectionAspectTest extends OperationCollectionAspectTestSupport {
+public class TraverseOperationCollectionAspectTest extends AbstractNeo4jCollectionAspectTestSupport {
@Autowired
OperationCollectionAspectTests tests;
View
2 ...neo4j/src/test/resources/test-context.xml → ...-INF/spring-neo4j-plugin-test-context.xml
@@ -5,7 +5,7 @@
xmlns:neo4j="http://www.springframework.org/schema/data/neo4j"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
- http://www.springframework.org/schema/data/neo4j http://www.springframework.org/schema/data/neo4j/spring-neo4j.xsd">
+ http://www.springframework.org/schema/data/neo4j http://www.springframework.org/schema/data/neo4j/spring-neo4j-2.0.xsd">
<context:annotation-config/>

0 comments on commit 5b15c87

Please sign in to comment.
Something went wrong with that request. Please try again.