Renamed all *Test to *Tests and fixed the depending context-files as well

This commit is contained in:
Michael Hunger
2013-02-08 15:03:02 +01:00
parent b3e35c7427
commit ab46f78098
135 changed files with 355 additions and 347 deletions

View File

@@ -27,9 +27,9 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml"})
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml"})
public class AttachEntityTest extends EntityTestBase {
public class AttachEntityTests extends EntityTestBase {
@Test
@Transactional

View File

@@ -40,8 +40,8 @@ import static org.junit.Assert.assertFalse;
import static org.springframework.data.neo4j.aspects.Person.persistedPerson;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml"})
public class DynamicPropertiesTest extends EntityTestBase {
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml"})
public class DynamicPropertiesTests extends EntityTestBase {
@Autowired
private Neo4jTemplate template;

View File

@@ -34,9 +34,9 @@ import javax.validation.ValidationException;
import static org.springframework.data.neo4j.aspects.Person.persistedPerson;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml"})
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml"})
public class EntityPropertyValidationTest extends EntityTestBase {
public class EntityPropertyValidationTests extends EntityTestBase {
protected final Logger log = LoggerFactory.getLogger(getClass());

View File

@@ -21,7 +21,7 @@ import org.springframework.data.neo4j.aspects.Person;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class EntityWithoutAspectSetupTest {
public class EntityWithoutAspectSetupTests {
@Test
public void testEquals() throws Exception {
final Person p1 = new Person();

View File

@@ -39,8 +39,8 @@ import static org.neo4j.helpers.collection.IteratorUtil.asCollection;
import static org.springframework.data.neo4j.aspects.Person.persistedPerson;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml"})
public class FinderTest extends EntityTestBase {
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml"})
public class FinderTests extends EntityTestBase {
@Test
@Transactional

View File

@@ -47,7 +47,7 @@ import static org.neo4j.helpers.collection.IteratorUtil.asCollection;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/repository-namespace-config-context.xml"})
@TestExecutionListeners({CleanContextCacheTestExecutionListener.class, DependencyInjectionTestExecutionListener.class, TransactionalTestExecutionListener.class})
public class GraphRepositoryTest extends EntityTestBase {
public class GraphRepositoryTests extends EntityTestBase {
@Before
public void setUp() throws Exception {

View File

@@ -54,10 +54,10 @@ import static org.springframework.data.neo4j.aspects.Person.NAME_INDEX;
import static org.springframework.data.neo4j.aspects.Person.persistedPerson;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml"})
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml"})
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
//@TestExecutionListeners({CleanContextCacheTestExecutionListener.class, DependencyInjectionTestExecutionListener.class, TransactionalTestExecutionListener.class})
public class IndexTest extends EntityTestBase {
public class IndexTests extends EntityTestBase {
private static final String NAME = "name";
private static final String NAME_VALUE = "aName";

View File

@@ -39,8 +39,8 @@ import static org.springframework.data.neo4j.aspects.support.HasRelationshipMatc
import static org.springframework.data.neo4j.aspects.support.HasRelationshipMatcher.hasRelationship;
@RunWith( SpringJUnit4ClassRunner.class )
@ContextConfiguration( locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml"} )
public class ModificationOutsideOfTransactionTest extends EntityTestBase {
@ContextConfiguration( locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml"} )
public class ModificationOutsideOfTransactionTests extends EntityTestBase {
@Before
public void cleanUp() {

View File

@@ -35,11 +35,11 @@ import static org.springframework.data.neo4j.aspects.Person.persistedPerson;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {
"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml",
"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml",
"classpath:org/springframework/data/neo4j/aspects/support/PersonDirectCreator-context.xml" })
@TestExecutionListeners({CleanContextCacheTestExecutionListener.class, DependencyInjectionTestExecutionListener.class, TransactionalTestExecutionListener.class})
public class NodeEntityInstantiationTest extends EntityTestBase {
public class NodeEntityInstantiationTests extends EntityTestBase {
@Test
@Transactional

View File

@@ -39,9 +39,9 @@ import static org.junit.internal.matchers.IsCollectionContaining.hasItems;
* @since 13.06.11
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml"})
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml"})
@Transactional
public class NodeEntityQueryTest extends EntityTestBase {
public class NodeEntityQueryTests extends EntityTestBase {
private TestTeam testTeam;
private Person michael;

View File

@@ -48,9 +48,9 @@ import static org.junit.Assert.assertTrue;
import static org.springframework.data.neo4j.aspects.Person.persistedPerson;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml"})
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml"})
public class NodeEntityRelationshipTest extends EntityTestBase {
public class NodeEntityRelationshipTests extends EntityTestBase {
@Test
@Transactional

View File

@@ -41,9 +41,9 @@ import static org.junit.Assert.fail;
import static org.springframework.data.neo4j.aspects.Person.persistedPerson;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml"})
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml"})
public class NodeEntityTest extends EntityTestBase {
public class NodeEntityTests extends EntityTestBase {
@Test
@Transactional

View File

@@ -27,9 +27,9 @@ import org.springframework.transaction.annotation.Transactional;
import static org.junit.Assert.assertEquals;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml"})
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml"})
public class ProjectionTest extends EntityTestBase {
public class ProjectionTests extends EntityTestBase {
@Test
@Transactional

View File

@@ -34,9 +34,9 @@ import static org.junit.Assert.assertEquals;
import static org.springframework.data.neo4j.aspects.Person.persistedPerson;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml"})
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml"})
public class PropertyTest extends EntityTestBase {
public class PropertyTests extends EntityTestBase {
@Test
@Transactional

View File

@@ -33,9 +33,9 @@ import static org.junit.Assert.*;
import static org.springframework.data.neo4j.aspects.Person.persistedPerson;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml"})
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml"})
public class RelationshipEntityTest extends EntityTestBase {
public class RelationshipEntityTests extends EntityTestBase {
@Test
@Transactional

View File

@@ -41,9 +41,9 @@ import static org.junit.Assert.assertEquals;
import static org.springframework.data.neo4j.aspects.Person.persistedPerson;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml"})
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml"})
public class TraversalTest extends EntityTestBase {
public class TraversalTests extends EntityTestBase {
@Test
@Transactional

View File

@@ -33,8 +33,8 @@ import org.springframework.transaction.annotation.Transactional;
* @since 26.02.11
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml"})
public class EntityMapperTest extends EntityTestBase {
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml"})
public class EntityMapperTests extends EntityTestBase {
@Test
@Transactional

View File

@@ -34,8 +34,8 @@ import org.springframework.transaction.annotation.Transactional;
* @since 26.02.11
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml"})
public class EntityPathTest extends EntityTestBase {
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml"})
public class EntityPathTests extends EntityTestBase {
@Test
@Transactional

View File

@@ -35,7 +35,7 @@ import static org.mockito.Mockito.mock;
* @author mh
* @since 22.02.11
*/
public class PathMappingIteratorTest extends EntityTestBase {
public class PathMappingIteratorTests extends EntityTestBase {
private static final int PATHS_COUNT = 3;

View File

@@ -42,9 +42,9 @@ import static org.junit.Assert.assertEquals;
* @since 13.06.11
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml"})
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml"})
@Transactional
public class GremlinQueryEngineTest extends EntityTestBase {
public class GremlinQueryEngineTests extends EntityTestBase {
private QueryEngine<Object> queryEngine;
private Person michael;

View File

@@ -56,9 +56,9 @@ import static org.neo4j.helpers.collection.MapUtil.map;
* @since 13.06.11
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml"})
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml"})
@Transactional
public class QueryEngineTest extends EntityTestBase {
public class QueryEngineTests extends EntityTestBase {
@Autowired
protected ConversionService conversionService;
@Autowired

View File

@@ -48,10 +48,10 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml",
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml",
"classpath:org/springframework/data/neo4j/aspects/support/IndexingTypeRepresentationStrategyOverride-context.xml"})
@TestExecutionListeners({CleanContextCacheTestExecutionListener.class, DependencyInjectionTestExecutionListener.class, TransactionalTestExecutionListener.class})
public class IndexingNodeTypeRepresentationStrategyTest extends EntityTestBase {
public class IndexingNodeTypeRepresentationStrategyTests extends EntityTestBase {
@Autowired
private IndexingNodeTypeRepresentationStrategy nodeTypeRepresentationStrategy;

View File

@@ -50,10 +50,10 @@ import static org.neo4j.helpers.collection.IteratorUtil.asCollection;
import static org.neo4j.helpers.collection.IteratorUtil.first;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml",
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml",
"classpath:org/springframework/data/neo4j/aspects/support/IndexingTypeRepresentationStrategyOverride-context.xml"})
@TestExecutionListeners({CleanContextCacheTestExecutionListener.class, DependencyInjectionTestExecutionListener.class, TransactionalTestExecutionListener.class})
public class IndexingRelationshipTypeRepresentationStrategyTest extends EntityTestBase {
public class IndexingRelationshipTypeRepresentationStrategyTests extends EntityTestBase {
@Autowired
private IndexingRelationshipTypeRepresentationStrategy relationshipTypeRepresentationStrategy;

View File

@@ -39,10 +39,10 @@ import org.springframework.test.context.transaction.TransactionalTestExecutionLi
import static org.junit.Assert.assertNull;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml",
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml",
"classpath:org/springframework/data/neo4j/aspects/support/NoopTypeRepresentationStrategyOverride-context.xml"})
@TestExecutionListeners({CleanContextCacheTestExecutionListener.class, DependencyInjectionTestExecutionListener.class, TransactionalTestExecutionListener.class})
public class NoopTypeRepresentationStrategyTest extends EntityTestBase {
public class NoopTypeRepresentationStrategyTests extends EntityTestBase {
@Autowired
private NoopNodeTypeRepresentationStrategy noopNodeStrategy;

View File

@@ -54,10 +54,10 @@ import static org.springframework.data.neo4j.aspects.Person.persistedPerson;
* @since 20.01.11
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml",
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml",
"classpath:org/springframework/data/neo4j/aspects/support/SubReferenceTypeRepresentationStrategyOverride-context.xml"})
@TestExecutionListeners({CleanContextCacheTestExecutionListener.class, DependencyInjectionTestExecutionListener.class, TransactionalTestExecutionListener.class})
public class SubReferenceNodeTypeRepresentationStrategyTest extends EntityTestBase {
public class SubReferenceNodeTypeRepresentationStrategyTests extends EntityTestBase {
@Autowired
private SubReferenceNodeTypeRepresentationStrategy nodeTypeRepresentationStrategy;

View File

@@ -36,7 +36,7 @@ import java.io.File;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:org/springframework/data/neo4j/config/DataGraphNamespaceHandlerTest-cross-store-context.xml")
public class DataGraphNamespaceHandlerCrossStoreTest {
public class DataGraphNamespaceHandlerCrossStoreTests {
@Autowired GraphDatabaseService graphDatabaseService;
@Autowired Neo4jTemplate template;

View File

@@ -26,5 +26,5 @@ import org.springframework.test.context.transaction.TransactionalTestExecutionLi
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/partial/Neo4jGraphRecommendationTest-context-config.xml"})
@TestExecutionListeners({CleanContextCacheTestExecutionListener.class, DependencyInjectionTestExecutionListener.class, TransactionalTestExecutionListener.class})
public class RecommendationConfigTest extends RecommendationTest {
public class RecommendationConfigTests extends RecommendationTests {
}

View File

@@ -40,9 +40,9 @@ import javax.persistence.PersistenceContext;
import javax.sql.DataSource;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/partial/Neo4jGraphRecommendationTest-context.xml"})
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/partial/Neo4jGraphRecommendationTests-context.xml"})
@TestExecutionListeners({CleanContextCacheTestExecutionListener.class, DependencyInjectionTestExecutionListener.class, TransactionalTestExecutionListener.class})
public class RecommendationTest {
public class RecommendationTests {
protected final Logger log = LoggerFactory.getLogger(getClass());

View File

@@ -13,7 +13,7 @@ import org.springframework.transaction.annotation.Transactional;
@ContextConfiguration(locations = "classpath:/backwardscompatibility.xml")
@RunWith(SpringJUnit4ClassRunner.class)
@Transactional
public class BackwardsCompatibilityTest
public class BackwardsCompatibilityTests
{
@Autowired
private Neo4jTemplate template;

View File

@@ -23,7 +23,7 @@ import static org.junit.Assert.assertTrue;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration({"/movies-test-context.xml"})
@Transactional
public class DomainTest {
public class DomainTests {
@Autowired
protected MovieRepository movieRepository;

View File

@@ -12,7 +12,7 @@ import static org.junit.Assert.assertEquals;
* @since 13.03.11
*/
@Ignore
public class MovieDbApiClientTest {
public class MovieDbApiClientTests {
private static final String API_KEY = "926d2a79e82920b62f03b1cb57e532e6";
@Test

View File

@@ -19,7 +19,7 @@ import static org.junit.Assert.assertEquals;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration({"/movies-test-context.xml"})
@Transactional
public class MovieDbImportServiceTest {
public class MovieDbImportServiceTests {
@Autowired
MovieDbImportService importService;

View File

@@ -15,7 +15,7 @@ import static org.junit.Assert.assertTrue;
* @author mh
* @since 13.03.11
*/
public class MovieDbLocalStorageTest {
public class MovieDbLocalStorageTests {
private static final String ID = "111";

View File

@@ -28,7 +28,7 @@ import static org.junit.Assert.assertTrue;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration({"/movies-test-context.xml"})
@Transactional
public class MoviesRepositoryTest {
public class MoviesRepositoryTests {
@Autowired
MovieRepository movieRepository;

View File

@@ -21,7 +21,7 @@ import static org.junit.matchers.JUnitMatchers.hasItem;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration({"/movies-test-context.xml"})
@Transactional
public class DomainTest extends RestTestBase {
public class DomainTests extends RestTestBase {
@Autowired
protected MovieRepository movieRepository;

View File

@@ -12,7 +12,7 @@ import static org.junit.Assert.assertEquals;
* @since 13.03.11
*/
@Ignore
public class MovieDbApiClientTest {
public class MovieDbApiClientTests {
private static final String API_KEY = "926d2a79e82920b62f03b1cb57e532e6";
@Test

View File

@@ -22,7 +22,7 @@ import static org.junit.Assert.assertEquals;
@ContextConfiguration({"/movies-test-context.xml"})
@Transactional
@Ignore("Should not be run nilly-willy - talks with http://api.themoviedb.org")
public class MovieDbImportServiceTest extends RestTestBase {
public class MovieDbImportServiceTests extends RestTestBase {
@Autowired
MovieDbImportService importService;

View File

@@ -15,7 +15,7 @@ import static org.junit.Assert.assertTrue;
* @author mh
* @since 13.03.11
*/
public class MovieDbLocalStorageTest {
public class MovieDbLocalStorageTests {
private static final String ID = "111";

View File

@@ -28,7 +28,7 @@ import static org.neo4j.helpers.collection.IteratorUtil.asCollection;
@RunWith( SpringJUnit4ClassRunner.class )
@ContextConfiguration( { "/movies-test-context.xml" } )
@Transactional
public class MoviesRepositoryTest extends RestTestBase {
public class MoviesRepositoryTests extends RestTestBase {
@Autowired
CineastsRepository repository;

View File

@@ -23,7 +23,7 @@ import static org.junit.Assert.*;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration({"/movies-test-context.xml"})
@Transactional
public class DomainTest {
public class DomainTests {
@Autowired
protected MovieRepository movieRepository;

View File

@@ -5,6 +5,7 @@ import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import org.hamcrest.Matchers;
import org.junit.Ignore;
import org.junit.Test;
import java.io.ByteArrayOutputStream;
@@ -13,6 +14,7 @@ import java.io.IOException;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
@Ignore("slow test")
public class DatabasePopulationIT {
@Test
public void shouldPopulateDatabase() throws Exception {

View File

@@ -12,7 +12,7 @@ import static org.junit.Assert.assertEquals;
* @since 13.03.11
*/
@Ignore
public class MovieDbApiClientTest {
public class MovieDbApiClientTests {
private static final String API_KEY = "926d2a79e82920b62f03b1cb57e532e6";
@Test

View File

@@ -25,7 +25,7 @@ import static org.junit.Assert.assertThat;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration({"/movies-test-context.xml"})
@Transactional
public class MovieDbImportServiceTest {
public class MovieDbImportServiceTests {
@Autowired
MovieDbImportService importService;

View File

@@ -15,7 +15,7 @@ import static org.junit.Assert.assertTrue;
* @author mh
* @since 13.03.11
*/
public class MovieDbLocalStorageTest {
public class MovieDbLocalStorageTests {
private static final String ID = "111";

View File

@@ -30,7 +30,7 @@ import static org.junit.Assert.assertTrue;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration({"/movies-test-context.xml"})
@Transactional
public class MoviesRepositoryTest {
public class MoviesRepositoryTests {
@Autowired MovieRepository movieRepository;
@Autowired UserRepository userRepository;
@Autowired Neo4jOperations template;

View File

@@ -21,7 +21,7 @@ import static org.junit.Assert.assertEquals;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration({"/movies-test-context.xml"})
@DirtiesContext
public class TransactionTest {
public class TransactionTests {
@Autowired
UserRepository userRepository;

View File

@@ -1,119 +1,119 @@
package org.springframework.data.neo4j.examples.hellograph;
import static org.hamcrest.CoreMatchers.anyOf;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.*;
import static org.junit.internal.matchers.StringContains.containsString;
import java.util.Collection;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.neo4j.support.Neo4jTemplate;
import org.springframework.data.neo4j.support.node.Neo4jHelper;
import org.springframework.test.annotation.Rollback;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.transaction.BeforeTransaction;
import org.springframework.transaction.annotation.Transactional;
@ContextConfiguration(locations = "classpath:/spring/helloWorldContext.xml")
@RunWith(SpringJUnit4ClassRunner.class)
@Transactional
public class GalaxyServiceTest {
@Autowired
private GalaxyService galaxyService;
@Autowired
private Neo4jTemplate template;
@Rollback(false)
@BeforeTransaction
public void cleanUpGraph() {
Neo4jHelper.cleanDb(template);
}
@Test
public void shouldAllowDirectWorldCreation() {
assertEquals(0, galaxyService.getNumberOfWorlds());
World myWorld = galaxyService.createWorld("mine", 0);
assertEquals(1, galaxyService.getNumberOfWorlds());
Iterable<World> foundWorlds = galaxyService.getAllWorlds();
World mine = foundWorlds.iterator().next();
assertEquals(myWorld.getName(), mine.getName());
}
@Test
public void shouldHaveCorrectNumberOfWorlds() {
galaxyService.makeSomeWorlds();
assertEquals(13, galaxyService.getNumberOfWorlds());
}
@Test
public void shouldFindWorldsById() {
galaxyService.makeSomeWorlds();
for(World world : galaxyService.getAllWorlds()) {
World foundWorld = galaxyService.findWorldById(world.getId());
assertNotNull(foundWorld);
}
}
@Test
public void shouldFindWorldsByName() {
galaxyService.makeSomeWorlds();
for(World world : galaxyService.getAllWorlds()) {
World foundWorld = galaxyService.findWorldByName(world.getName());
assertNotNull(foundWorld);
}
}
@Test
public void shouldReachMarsFromEarth() {
galaxyService.makeSomeWorlds();
World earth = galaxyService.findWorldByName("Earth");
World mars = galaxyService.findWorldByName("Mars");
assertTrue(mars.canBeReachedFrom(earth));
assertTrue(earth.canBeReachedFrom(mars));
}
@Test
public void shouldFindAllWorlds() {
Collection<World> madeWorlds = galaxyService.makeSomeWorlds();
Iterable<World> foundWorlds = galaxyService.getAllWorlds();
int countOfFoundWorlds = 0;
for(World foundWorld : foundWorlds) {
assertTrue(madeWorlds.contains(foundWorld));
countOfFoundWorlds++;
}
assertEquals(madeWorlds.size(), countOfFoundWorlds);
}
@SuppressWarnings("unchecked")
@Test
public void shouldFindWorldsWith1Moon() {
galaxyService.makeSomeWorlds();
for(World worldWithOneMoon : galaxyService.findAllByNumberOfMoons(1)) {
assertThat(
worldWithOneMoon.getName(),
is(anyOf(containsString("Earth"), containsString("Midgard"))));
}
}
@Test
public void shouldNotFindKrypton() {
galaxyService.makeSomeWorlds();
World krypton = galaxyService.findWorldByName("Krypton");
assertNull(krypton);
}
}
package org.springframework.data.neo4j.examples.hellograph;
import static org.hamcrest.CoreMatchers.anyOf;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.*;
import static org.junit.internal.matchers.StringContains.containsString;
import java.util.Collection;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.neo4j.support.Neo4jTemplate;
import org.springframework.data.neo4j.support.node.Neo4jHelper;
import org.springframework.test.annotation.Rollback;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.transaction.BeforeTransaction;
import org.springframework.transaction.annotation.Transactional;
@ContextConfiguration(locations = "classpath:/spring/helloWorldContext.xml")
@RunWith(SpringJUnit4ClassRunner.class)
@Transactional
public class GalaxyServiceTests {
@Autowired
private GalaxyService galaxyService;
@Autowired
private Neo4jTemplate template;
@Rollback(false)
@BeforeTransaction
public void cleanUpGraph() {
Neo4jHelper.cleanDb(template);
}
@Test
public void shouldAllowDirectWorldCreation() {
assertEquals(0, galaxyService.getNumberOfWorlds());
World myWorld = galaxyService.createWorld("mine", 0);
assertEquals(1, galaxyService.getNumberOfWorlds());
Iterable<World> foundWorlds = galaxyService.getAllWorlds();
World mine = foundWorlds.iterator().next();
assertEquals(myWorld.getName(), mine.getName());
}
@Test
public void shouldHaveCorrectNumberOfWorlds() {
galaxyService.makeSomeWorlds();
assertEquals(13, galaxyService.getNumberOfWorlds());
}
@Test
public void shouldFindWorldsById() {
galaxyService.makeSomeWorlds();
for(World world : galaxyService.getAllWorlds()) {
World foundWorld = galaxyService.findWorldById(world.getId());
assertNotNull(foundWorld);
}
}
@Test
public void shouldFindWorldsByName() {
galaxyService.makeSomeWorlds();
for(World world : galaxyService.getAllWorlds()) {
World foundWorld = galaxyService.findWorldByName(world.getName());
assertNotNull(foundWorld);
}
}
@Test
public void shouldReachMarsFromEarth() {
galaxyService.makeSomeWorlds();
World earth = galaxyService.findWorldByName("Earth");
World mars = galaxyService.findWorldByName("Mars");
assertTrue(mars.canBeReachedFrom(earth));
assertTrue(earth.canBeReachedFrom(mars));
}
@Test
public void shouldFindAllWorlds() {
Collection<World> madeWorlds = galaxyService.makeSomeWorlds();
Iterable<World> foundWorlds = galaxyService.getAllWorlds();
int countOfFoundWorlds = 0;
for(World foundWorld : foundWorlds) {
assertTrue(madeWorlds.contains(foundWorld));
countOfFoundWorlds++;
}
assertEquals(madeWorlds.size(), countOfFoundWorlds);
}
@SuppressWarnings("unchecked")
@Test
public void shouldFindWorldsWith1Moon() {
galaxyService.makeSomeWorlds();
for(World worldWithOneMoon : galaxyService.findAllByNumberOfMoons(1)) {
assertThat(
worldWithOneMoon.getName(),
is(anyOf(containsString("Earth"), containsString("Midgard"))));
}
}
@Test
public void shouldNotFindKrypton() {
galaxyService.makeSomeWorlds();
World krypton = galaxyService.findWorldByName("Krypton");
assertNull(krypton);
}
}

View File

@@ -23,7 +23,7 @@ import java.util.List;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration
@DirtiesContext
public class RestaurantRepositoryTest {
public class RestaurantRepositoryTests {
protected final Logger log = LoggerFactory.getLogger(getClass());

View File

@@ -20,7 +20,7 @@ import java.util.List;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration
@DirtiesContext
public class UserAccountRelationshipsTest extends AbstractTestWithUserAccount {
public class UserAccountRelationshipsTests extends AbstractTestWithUserAccount {
@Autowired
UserAccountRepository userAccountRepo;

View File

@@ -18,7 +18,7 @@ import java.util.List;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration
@DirtiesContext
public class UserAccountRepositoryTest extends AbstractTestWithUserAccount {
public class UserAccountRepositoryTests extends AbstractTestWithUserAccount {
@Autowired
UserAccountRepository repo;

View File

@@ -34,7 +34,7 @@ import static java.util.Arrays.asList;
@ContextConfiguration
@DirtiesContext
@Transactional
public class TopRatedRestaurantFinderTest {
public class TopRatedRestaurantFinderTests {
@Autowired
private Neo4jTemplate template;

View File

@@ -20,7 +20,7 @@ import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.springframework.data.neo4j.aspects.support.EntityPropertyValidationTest;
import org.springframework.data.neo4j.aspects.support.EntityPropertyValidationTests;
import org.springframework.data.neo4j.rest.support.RestTestBase;
import org.springframework.test.context.CleanContextCacheTestExecutionListener;
import org.springframework.test.context.ContextConfiguration;
@@ -34,10 +34,10 @@ import org.springframework.test.context.transaction.TransactionalTestExecutionLi
* @since 28.03.11
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml",
"classpath:RestTest-context.xml"})
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml",
"classpath:RestTests-context.xml"})
@TestExecutionListeners({CleanContextCacheTestExecutionListener.class, DependencyInjectionTestExecutionListener.class, TransactionalTestExecutionListener.class})
public class RestEntityPropertyValidationTest extends EntityPropertyValidationTest {
public class RestEntityPropertyValidationTests extends EntityPropertyValidationTests {
@BeforeClass
public static void startDb() throws Exception {

View File

@@ -20,7 +20,7 @@ import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.springframework.data.neo4j.aspects.support.FinderTest;
import org.springframework.data.neo4j.aspects.support.FinderTests;
import org.springframework.data.neo4j.rest.support.RestTestBase;
import org.springframework.test.context.CleanContextCacheTestExecutionListener;
import org.springframework.test.context.ContextConfiguration;
@@ -34,10 +34,10 @@ import org.springframework.test.context.transaction.TransactionalTestExecutionLi
* @since 28.03.11
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml",
"classpath:RestTest-context.xml"})
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml",
"classpath:RestTests-context.xml"})
@TestExecutionListeners({CleanContextCacheTestExecutionListener.class, DependencyInjectionTestExecutionListener.class, TransactionalTestExecutionListener.class})
public class RestFinderTest extends FinderTest {
public class RestFinderTests extends FinderTests {
@BeforeClass
public static void startDb() throws Exception {

View File

@@ -20,7 +20,7 @@ import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.springframework.data.neo4j.aspects.support.IndexTest;
import org.springframework.data.neo4j.aspects.support.IndexTests;
import org.springframework.data.neo4j.rest.support.RestTestBase;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.CleanContextCacheTestExecutionListener;
@@ -35,10 +35,10 @@ import org.springframework.test.context.transaction.TransactionalTestExecutionLi
* @since 28.03.11
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml",
"classpath:RestTest-context.xml"})
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml",
"classpath:RestTests-context.xml"})
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
public class RestIndexTest extends IndexTest {
public class RestIndexTests extends IndexTests {
@BeforeClass
public static void startDb() throws Exception {

View File

@@ -27,11 +27,11 @@ import org.springframework.dao.DataAccessException;
import org.springframework.data.neo4j.config.NullTransactionManager;
import org.springframework.data.neo4j.core.GraphDatabase;
import org.springframework.data.neo4j.rest.support.RestTestHelper;
import org.springframework.data.neo4j.template.Neo4jTemplateApiTest;
import org.springframework.data.neo4j.template.Neo4jTemplateApiTests;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.jta.JtaTransactionManager;
public class RestNeo4jTemplateApiTest extends Neo4jTemplateApiTest
public class RestNeo4jTemplateApiTests extends Neo4jTemplateApiTests
{
private static RestTestHelper testHelper;

View File

@@ -20,10 +20,10 @@ import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.springframework.data.neo4j.core.GraphDatabase;
import org.springframework.data.neo4j.rest.support.RestTestHelper;
import org.springframework.data.neo4j.template.Neo4jTemplateTest;
import org.springframework.data.neo4j.template.Neo4jTemplateTests;
import org.springframework.transaction.PlatformTransactionManager;
public class RestNeo4jTemplateTest extends Neo4jTemplateTest
public class RestNeo4jTemplateTests extends Neo4jTemplateTests
{
private static RestTestHelper testHelper;

View File

@@ -21,11 +21,11 @@ import org.junit.BeforeClass;
import org.springframework.data.neo4j.config.NullTransactionManager;
import org.springframework.data.neo4j.core.GraphDatabase;
import org.springframework.data.neo4j.rest.support.RestTestHelper;
import org.springframework.data.neo4j.template.NeoTraversalTest;
import org.springframework.data.neo4j.template.NeoTraversalTests;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.jta.JtaTransactionManager;
public class RestNeoTraversalTest extends NeoTraversalTest
public class RestNeoTraversalTests extends NeoTraversalTests
{
private static RestTestHelper testHelper;

View File

@@ -20,7 +20,7 @@ import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.springframework.data.neo4j.aspects.support.NodeEntityRelationshipTest;
import org.springframework.data.neo4j.aspects.support.NodeEntityRelationshipTests;
import org.springframework.data.neo4j.rest.support.RestTestBase;
import org.springframework.test.context.CleanContextCacheTestExecutionListener;
import org.springframework.test.context.ContextConfiguration;
@@ -34,10 +34,10 @@ import org.springframework.test.context.transaction.TransactionalTestExecutionLi
* @since 28.03.11
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml",
"classpath:RestTest-context.xml"})
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml",
"classpath:RestTests-context.xml"})
@TestExecutionListeners({CleanContextCacheTestExecutionListener.class, DependencyInjectionTestExecutionListener.class, TransactionalTestExecutionListener.class})
public class RestNodeEntityRelationshipTest extends NodeEntityRelationshipTest {
public class RestNodeEntityRelationshipTests extends NodeEntityRelationshipTests {
@BeforeClass
public static void startDb() throws Exception {

View File

@@ -21,7 +21,7 @@ import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.runner.RunWith;
import org.springframework.data.neo4j.aspects.support.NodeEntityTest;
import org.springframework.data.neo4j.aspects.support.NodeEntityTests;
import org.springframework.data.neo4j.rest.support.RestTestBase;
import org.springframework.test.context.CleanContextCacheTestExecutionListener;
import org.springframework.test.context.ContextConfiguration;
@@ -35,10 +35,10 @@ import org.springframework.test.context.transaction.TransactionalTestExecutionLi
* @since 28.03.11
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml",
"classpath:RestTest-context.xml"})
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml",
"classpath:RestTests-context.xml"})
@TestExecutionListeners({CleanContextCacheTestExecutionListener.class, DependencyInjectionTestExecutionListener.class, TransactionalTestExecutionListener.class})
public class RestNodeEntityTest extends NodeEntityTest {
public class RestNodeEntityTests extends NodeEntityTests {
@BeforeClass
public static void startDb() throws Exception {

View File

@@ -20,7 +20,7 @@ import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.springframework.data.neo4j.aspects.support.ProjectionTest;
import org.springframework.data.neo4j.aspects.support.ProjectionTests;
import org.springframework.data.neo4j.rest.support.RestTestBase;
import org.springframework.test.context.CleanContextCacheTestExecutionListener;
import org.springframework.test.context.ContextConfiguration;
@@ -34,10 +34,10 @@ import org.springframework.test.context.transaction.TransactionalTestExecutionLi
* @since 28.03.11
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml",
"classpath:RestTest-context.xml"})
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml",
"classpath:RestTests-context.xml"})
@TestExecutionListeners({CleanContextCacheTestExecutionListener.class, DependencyInjectionTestExecutionListener.class, TransactionalTestExecutionListener.class})
public class RestProjectionTest extends ProjectionTest {
public class RestProjectionTests extends ProjectionTests {
@BeforeClass
public static void startDb() throws Exception {

View File

@@ -20,7 +20,7 @@ import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.springframework.data.neo4j.aspects.support.PropertyTest;
import org.springframework.data.neo4j.aspects.support.PropertyTests;
import org.springframework.data.neo4j.rest.support.RestTestBase;
import org.springframework.test.context.CleanContextCacheTestExecutionListener;
import org.springframework.test.context.ContextConfiguration;
@@ -34,10 +34,10 @@ import org.springframework.test.context.transaction.TransactionalTestExecutionLi
* @since 28.03.11
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml",
"classpath:RestTest-context.xml"})
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml",
"classpath:RestTests-context.xml"})
@TestExecutionListeners({CleanContextCacheTestExecutionListener.class, DependencyInjectionTestExecutionListener.class, TransactionalTestExecutionListener.class})
public class RestPropertyTest extends PropertyTest {
public class RestPropertyTests extends PropertyTests {
@BeforeClass
public static void startDb() throws Exception {

View File

@@ -20,7 +20,7 @@ import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.springframework.data.neo4j.aspects.support.RelationshipEntityTest;
import org.springframework.data.neo4j.aspects.support.RelationshipEntityTests;
import org.springframework.data.neo4j.rest.support.RestTestBase;
import org.springframework.test.context.CleanContextCacheTestExecutionListener;
import org.springframework.test.context.ContextConfiguration;
@@ -34,10 +34,10 @@ import org.springframework.test.context.transaction.TransactionalTestExecutionLi
* @since 28.03.11
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml",
"classpath:RestTest-context.xml"})
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml",
"classpath:RestTests-context.xml"})
@TestExecutionListeners({CleanContextCacheTestExecutionListener.class, DependencyInjectionTestExecutionListener.class, TransactionalTestExecutionListener.class})
public class RestRelationshipEntityTest extends RelationshipEntityTest {
public class RestRelationshipEntityTests extends RelationshipEntityTests {
@BeforeClass
public static void startDb() throws Exception {

View File

@@ -20,7 +20,7 @@ import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.springframework.data.neo4j.aspects.support.TraversalTest;
import org.springframework.data.neo4j.aspects.support.TraversalTests;
import org.springframework.data.neo4j.rest.support.RestTestBase;
import org.springframework.test.context.CleanContextCacheTestExecutionListener;
import org.springframework.test.context.ContextConfiguration;
@@ -34,10 +34,10 @@ import org.springframework.test.context.transaction.TransactionalTestExecutionLi
* @since 28.03.11
*/
@RunWith( SpringJUnit4ClassRunner.class )
@ContextConfiguration( locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml",
"classpath:RestTest-context.xml"} )
@ContextConfiguration( locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml",
"classpath:RestTests-context.xml"} )
@TestExecutionListeners( {CleanContextCacheTestExecutionListener.class, DependencyInjectionTestExecutionListener.class, TransactionalTestExecutionListener.class} )
public class RestTraversalTest extends TraversalTest
public class RestTraversalTests extends TraversalTests
{
@BeforeClass

View File

@@ -21,7 +21,7 @@ import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.springframework.data.neo4j.rest.support.RestTestBase;
import org.springframework.data.neo4j.unique.UniqueEntityTest;
import org.springframework.data.neo4j.unique.UniqueEntityTests;
import org.springframework.test.context.CleanContextCacheTestExecutionListener;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestExecutionListeners;
@@ -36,9 +36,9 @@ import org.springframework.test.context.transaction.TransactionalTestExecutionLi
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {
"classpath:unique-test-context.xml",
"classpath:RestTest-context.xml"})
"classpath:RestTests-context.xml"})
@TestExecutionListeners({CleanContextCacheTestExecutionListener.class, DependencyInjectionTestExecutionListener.class, TransactionalTestExecutionListener.class})
public class RestUniqueEntityTest extends UniqueEntityTest {
public class RestUniqueEntityTests extends UniqueEntityTests {
@BeforeClass
public static void startDb() throws Exception {

View File

@@ -28,7 +28,7 @@ import java.util.Arrays;
import static org.junit.Assert.assertEquals;
import static org.neo4j.helpers.collection.MapUtil.map;
public class RestEntityTest extends RestTestBase {
public class RestEntityTests extends RestTestBase {
@Test
public void testSetProperty() {

View File

@@ -22,7 +22,7 @@ import org.neo4j.graphdb.*;
import java.util.Date;
public class RestGraphDbTest extends RestTestBase {
public class RestGraphDbTests extends RestTestBase {
@Test
public void testGetRefNode() {

View File

@@ -20,7 +20,7 @@ import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.neo4j.aspects.support.query.GremlinQueryEngineTest;
import org.springframework.data.neo4j.aspects.support.query.GremlinQueryEngineTests;
import org.springframework.data.neo4j.core.GraphDatabase;
import org.springframework.data.neo4j.rest.SpringRestGraphDatabase;
import org.springframework.test.context.CleanContextCacheTestExecutionListener;
@@ -36,10 +36,10 @@ import org.springframework.test.context.transaction.TransactionalTestExecutionLi
* @since 23.06.11
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml",
"classpath:RestTest-context.xml"})
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml",
"classpath:RestTests-context.xml"})
@TestExecutionListeners({CleanContextCacheTestExecutionListener.class, DependencyInjectionTestExecutionListener.class, TransactionalTestExecutionListener.class})
public class RestGremlinQueryEngineTest extends GremlinQueryEngineTest {
public class RestGremlinQueryEngineTests extends GremlinQueryEngineTests {
@Autowired
SpringRestGraphDatabase restGraphDatabase;

View File

@@ -26,7 +26,7 @@ import org.neo4j.graphdb.index.RelationshipIndex;
import java.util.Arrays;
public class RestIndexTest extends RestTestBase {
public class RestIndexTests extends RestTestBase {
private static final String NODE_INDEX_NAME = "NODE_INDEX";
private static final String REL_INDEX_NAME = "REL_INDEX";

View File

@@ -22,7 +22,7 @@ import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.neo4j.aspects.support.query.QueryEngineTest;
import org.springframework.data.neo4j.aspects.support.query.QueryEngineTests;
import org.springframework.data.neo4j.core.GraphDatabase;
import org.springframework.data.neo4j.rest.SpringRestGraphDatabase;
import org.springframework.test.context.CleanContextCacheTestExecutionListener;
@@ -38,10 +38,10 @@ import org.springframework.test.context.transaction.TransactionalTestExecutionLi
* @since 23.06.11
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTest-context.xml",
"classpath:RestTest-context.xml"})
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/aspects/support/Neo4jGraphPersistenceTests-context.xml",
"classpath:RestTests-context.xml"})
@TestExecutionListeners({CleanContextCacheTestExecutionListener.class, DependencyInjectionTestExecutionListener.class, TransactionalTestExecutionListener.class})
public class RestQueryEngineTest extends QueryEngineTest {
public class RestQueryEngineTests extends QueryEngineTests {
@Autowired
SpringRestGraphDatabase restGraphDatabase;

View File

@@ -30,7 +30,7 @@ import java.util.Map;
* @author Michael Hunger
* @since 03.02.11
*/
public class RestTraversalDescriptionTest
public class RestTraversalDescriptionTests
{
private RestTraversal traversalDescription;

View File

@@ -24,7 +24,7 @@ import org.neo4j.graphdb.traversal.TraversalDescription;
import org.neo4j.graphdb.traversal.Traverser;
import org.neo4j.rest.graphdb.traversal.RestTraversal;
public class RestTraversalExecutionTest extends RestTestBase {
public class RestTraversalExecutionTests extends RestTestBase {
@Test
public void testTraverseToNeighbour() {
final Relationship rel = relationship();

View File

@@ -37,7 +37,7 @@ import static org.springframework.data.neo4j.aspects.Person.persistedPerson;
* @author mh
* @since 14.04.11
*/
public class ServerPluginTest extends RestTestBase {
public class ServerPluginTests extends RestTestBase {
@BeforeClass
public static void init() {

View File

@@ -33,11 +33,11 @@ import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
@Path( "/" )
public class SpringPluginInitializerTest extends SpringPluginInitializer implements TestInterface {
public class SpringPluginInitializerTests extends SpringPluginInitializer implements TestInterface {
private LocalTestServer neoServer;
public SpringPluginInitializerTest() {
super( new String[]{"ServerTest-context.xml"}, expose("testObject", TestInterface.class) );
public SpringPluginInitializerTests() {
super( new String[]{"ServerTests-context.xml"}, expose("testObject", TestInterface.class) );
}
private static int touched = 0;

View File

@@ -1 +1 @@
org.springframework.data.neo4j.rest.support.SpringPluginInitializerTest
org.springframework.data.neo4j.rest.support.SpringPluginInitializerTests

View File

@@ -3,6 +3,6 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id="testObject" class="org.springframework.data.neo4j.rest.support.SpringPluginInitializerTest" scope="singleton" />
<bean id="testObject" class="org.springframework.data.neo4j.rest.support.SpringPluginInitializerTests" scope="singleton" />
</beans>

View File

@@ -25,17 +25,17 @@ import org.springframework.transaction.support.DefaultTransactionDefinition;
import static junit.framework.Assert.*;
import static org.junit.Assert.assertThat;
import static org.springframework.data.neo4j.transaction.ChainedTransactionManagerTest.TestPlatformTransactionManager.createFailingTransactionManager;
import static org.springframework.data.neo4j.transaction.ChainedTransactionManagerTest.TestPlatformTransactionManager.createNonFailingTransactionManager;
import static org.springframework.data.neo4j.transaction.ChainedTransactionManagerTest.TransactionManagerMatcher.isCommitted;
import static org.springframework.data.neo4j.transaction.ChainedTransactionManagerTest.TransactionManagerMatcher.wasRolledback;
import static org.springframework.data.neo4j.transaction.ChainedTransactionManagerTests.TestPlatformTransactionManager.createFailingTransactionManager;
import static org.springframework.data.neo4j.transaction.ChainedTransactionManagerTests.TestPlatformTransactionManager.createNonFailingTransactionManager;
import static org.springframework.data.neo4j.transaction.ChainedTransactionManagerTests.TransactionManagerMatcher.isCommitted;
import static org.springframework.data.neo4j.transaction.ChainedTransactionManagerTests.TransactionManagerMatcher.wasRolledback;
import static org.springframework.transaction.HeuristicCompletionException.getStateString;
/**
* @author mh
* @since 15.02.11
*/
public class ChainedTransactionManagerTest {
public class ChainedTransactionManagerTests {
private ChainedTransactionManager tm;

View File

@@ -42,7 +42,7 @@ import static org.junit.Assert.assertNotNull;
* @since 21.02.11
*/
public class JOTMIntegrationTest {
public class JOTMIntegrationTests {
private ClassPathXmlApplicationContext ctx;
private GraphDatabaseService gds;

View File

@@ -29,7 +29,7 @@ import static org.junit.Assert.assertSame;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:related-to-test-context.xml"})
@Transactional
public class BiDirectionalMappingTest {
public class BiDirectionalMappingTests {
@NodeEntity
static class TestEntityOne {
@GraphId Long id;

View File

@@ -32,7 +32,7 @@ import static org.junit.Assert.assertSame;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:related-to-test-context.xml"})
@Transactional
public class BiDirectionalRelatedToViaMappingTest {
public class BiDirectionalRelatedToViaMappingTests {
@NodeEntity
static class TestEntity {
@GraphId Long id;

View File

@@ -37,7 +37,7 @@ import static org.junit.internal.matchers.IsCollectionContaining.hasItems;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:related-to-test-context.xml"})
@Transactional
public class BiDirectionalRelatedToViaWithCollectionFetchMappingTest {
public class BiDirectionalRelatedToViaWithCollectionFetchMappingTests {
@NodeEntity
static class TestEntity {
@GraphId Long id;

View File

@@ -32,7 +32,7 @@ import static org.junit.Assert.assertSame;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:related-to-test-context.xml"})
@Transactional
public class BiDirectionalRelatedToViaWithSingleFetchMappingTest {
public class BiDirectionalRelatedToViaWithSingleFetchMappingTests {
@NodeEntity
static class TestEntity {
@GraphId Long id;

View File

@@ -24,12 +24,12 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
* @author mh
* @since 23.03.11
*/
public class ConfigurationConfirmationTest {
public class ConfigurationConfirmationTests {
@Test(expected = BeanCreationException.class)
public void testInvalidTransactionManagerFails() {
ClassPathXmlApplicationContext ctx = null;
try {
ctx = new ClassPathXmlApplicationContext("classpath:org/springframework/data/neo4j/config/ConfigurationConfirmationTest-context.xml");
ctx = new ClassPathXmlApplicationContext("classpath:org/springframework/data/neo4j/config/ConfigurationConfirmationTests-context.xml");
ctx.start();
} finally {
if (ctx != null) {

View File

@@ -47,7 +47,7 @@ import static org.junit.Assert.assertTrue;
* @since 31.01.11
*/
public class DataGraphNamespaceHandlerTest {
public class DataGraphNamespaceHandlerTests {
static class Config {
@Autowired
@@ -116,7 +116,7 @@ public class DataGraphNamespaceHandlerTest {
}
private Config assertInjected(String testCase) {
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("classpath:org/springframework/data/neo4j/config/DataGraphNamespaceHandlerTest" + testCase + "-context.xml");
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("classpath:org/springframework/data/neo4j/config/DataGraphNamespaceHandlerTests" + testCase + "-context.xml");
try {
Config config = ctx.getBean("config", Config.class);
Neo4jTemplate template = config.neo4jTemplate;

View File

@@ -34,7 +34,7 @@ import static org.neo4j.helpers.collection.IteratorUtil.asCollection;
import static org.neo4j.helpers.collection.MapUtil.map;
public class QueryMapResultConverterTest extends Neo4jPersistentTestBase {
public class QueryMapResultConverterTests extends Neo4jPersistentTestBase {
private Map<String, Object> simpleMap;
private List<String> friends;

View File

@@ -27,7 +27,7 @@ import static org.springframework.data.neo4j.conversion.QueryResultBuilder.from;
* @author mh
* @since 11.11.11
*/
public class QueryResultBuilderTest {
public class QueryResultBuilderTests {
private final DefaultConverter defaultConverter = new DefaultConverter();
private QueryResultBuilder<Integer> result = new QueryResultBuilder<Integer>(asList(1, 2, 3));

View File

@@ -29,7 +29,7 @@ import java.util.Map;
import org.junit.Test;
import org.neo4j.helpers.collection.IteratorUtil;
public class PrefixedDynamicPropertyTest {
public class PrefixedDynamicPropertyTests {
private static final String VALUE = "value";
private static final String VALUE2 = "value2";
private static final String DEFAULT_VALUE = "default_value";

View File

@@ -37,7 +37,7 @@ import static org.neo4j.helpers.collection.IteratorUtil.count;
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration
public class InheritanceTest {
public class InheritanceTests {
private String validName="projectDetail";
@Autowired ProjectRepository projectRepository;

View File

@@ -40,7 +40,7 @@ import static org.neo4j.helpers.collection.IteratorUtil.first;
* @author mh
* @since 19.09.11
*/
public class Neo4jEntityConverterTest extends Neo4jPersistentTestBase {
public class Neo4jEntityConverterTests extends Neo4jPersistentTestBase {
/* OUCH

View File

@@ -31,7 +31,7 @@ import static org.junit.Assert.assertNotSame;
* @author mh
* @since 12.10.11
*/
public class Neo4jEntityPersisterTest extends Neo4jPersistentTestBase {
public class Neo4jEntityPersisterTests extends Neo4jPersistentTestBase {
@Test
public void testCreateEntityFromStoredType() throws Exception {

View File

@@ -30,7 +30,7 @@ import static org.junit.Assert.assertEquals;
* @author mh
* @since 19.09.11
*/
public class Neo4jMappingContextTest {
public class Neo4jMappingContextTests {
private Neo4jMappingContext mappingContext;
private Neo4jPersistentEntityImpl<?> personType;

View File

@@ -30,7 +30,7 @@ import static org.junit.Assert.assertEquals;
* @author mh
* @since 20.02.12
*/
public class Neo4jPersistentEntityTest {
public class Neo4jPersistentEntityTests {
private Neo4jMappingContext mappingContext;
private Neo4jPersistentEntityImpl<?> personType;

View File

@@ -21,7 +21,7 @@ import org.springframework.data.mapping.model.MappingException;
import org.springframework.data.neo4j.annotation.*;
import org.springframework.data.neo4j.support.mapping.Neo4jMappingContext;
public class InvalidMappingTest {
public class InvalidMappingTests {
@NodeEntity
static class TestEntityRelatedTo {
@GraphId Long id;

View File

@@ -51,10 +51,10 @@ import static org.neo4j.helpers.collection.MapUtil.map;
* @since 11.11.11
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/repository/GraphRepositoryTest-context.xml"})
@ContextConfiguration(locations = {"classpath:org/springframework/data/neo4j/repository/GraphRepositoryTests-context.xml"})
@TestExecutionListeners({CleanContextCacheTestExecutionListener.class, DependencyInjectionTestExecutionListener.class, TransactionalTestExecutionListener.class})
@Transactional
public class CypherDslRepositoryTest {
public class CypherDslRepositoryTests {
@Autowired PersonRepository personRepository;
@Autowired Neo4jOperations template;

Some files were not shown because too many files have changed in this diff Show More