#86 - Fixed test names to make sure they run during build.
Fixed some generics declaration to make sure code compiles on Java 6 as well.
This commit is contained in:
@@ -13,7 +13,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
* @author Oliver Gierke
|
||||
* @author Jon Brisbin
|
||||
*/
|
||||
public abstract class AbstractJackson2MarshallingIntegrationTests {
|
||||
public abstract class AbstractJackson2MarshallingIntegrationTest {
|
||||
|
||||
protected ObjectMapper mapper;
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.junit.Before;
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public abstract class AbstractMarshallingIntegrationTests {
|
||||
public abstract class AbstractMarshallingIntegrationTest {
|
||||
|
||||
protected ObjectMapper mapper;
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.junit.Test;
|
||||
* @author Oliver Gierke
|
||||
* @author Jon Brisbin
|
||||
*/
|
||||
public class Jackson2LinkIntegrationTest extends AbstractJackson2MarshallingIntegrationTests {
|
||||
public class Jackson2LinkIntegrationTest extends AbstractJackson2MarshallingIntegrationTest {
|
||||
|
||||
private static final String REFERENCE = "{\"rel\":\"something\",\"href\":\"location\"}";
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||
* @author Oliver Gierke
|
||||
* @author Jon Brisbin
|
||||
*/
|
||||
public class Jackson2ResourceIntegrationTest extends AbstractJackson2MarshallingIntegrationTests {
|
||||
public class Jackson2ResourceIntegrationTest extends AbstractJackson2MarshallingIntegrationTest {
|
||||
|
||||
static final String REFERENCE = "{\"links\":[{\"rel\":\"self\",\"href\":\"localhost\"}],\"firstname\":\"Dave\",\"lastname\":\"Matthews\"}";
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.junit.Test;
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class Jackson2ResourceSupportIntegrationTest extends AbstractJackson2MarshallingIntegrationTests {
|
||||
public class Jackson2ResourceSupportIntegrationTest extends AbstractJackson2MarshallingIntegrationTest {
|
||||
|
||||
static final String REFERENCE = "{\"links\":[{\"rel\":\"self\",\"href\":\"localhost\"}]}";
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.junit.Test;
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class LinkIntegrationTest extends AbstractMarshallingIntegrationTests {
|
||||
public class LinkIntegrationTest extends AbstractMarshallingIntegrationTest {
|
||||
|
||||
private static final String REFERENCE = "{\"rel\":\"something\",\"href\":\"location\"}";
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.junit.Test;
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class ResourceIntegrationTest extends AbstractMarshallingIntegrationTests {
|
||||
public class ResourceIntegrationTest extends AbstractMarshallingIntegrationTest {
|
||||
|
||||
static final String REFERENCE = "{\"links\":[{\"rel\":\"self\",\"href\":\"localhost\"}],\"firstname\":\"Dave\",\"lastname\":\"Matthews\"}";
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.junit.Test;
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class ResourceSupportIntegrationTest extends AbstractMarshallingIntegrationTests {
|
||||
public class ResourceSupportIntegrationTest extends AbstractMarshallingIntegrationTest {
|
||||
|
||||
static final String REFERENCE = "{\"links\":[{\"rel\":\"self\",\"href\":\"localhost\"}]}";
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ import com.fasterxml.jackson.databind.SerializationFeature;
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class VndErrorsMarshallingTests {
|
||||
public class VndErrorsMarshallingTest {
|
||||
|
||||
ObjectMapper jackson1Mapper;
|
||||
com.fasterxml.jackson.databind.ObjectMapper jackson2Mapper;
|
||||
@@ -55,7 +55,7 @@ public class VndErrorsMarshallingTests {
|
||||
String jsonReference;
|
||||
String xmlReference;
|
||||
|
||||
public VndErrorsMarshallingTests() throws IOException {
|
||||
public VndErrorsMarshallingTest() throws IOException {
|
||||
|
||||
jsonReference = readFile(new ClassPathResource("vnderror.json"));
|
||||
xmlReference = readFile(new ClassPathResource("vnderror.xml"));
|
||||
@@ -77,13 +77,13 @@ public class EnableHypermediaSupportIntegrationTest {
|
||||
private static void assertEntityLinksSetUp(ApplicationContext context) {
|
||||
|
||||
Map<String, EntityLinks> discoverers = context.getBeansOfType(EntityLinks.class);
|
||||
assertThat(discoverers.values(), hasItem(Matchers.<EntityLinks> instanceOf(DelegatingEntityLinks.class)));
|
||||
assertThat(discoverers.values(), Matchers.<EntityLinks> hasItem(instanceOf(DelegatingEntityLinks.class)));
|
||||
}
|
||||
|
||||
private static void assertRelProvidersSetUp(ApplicationContext context) {
|
||||
|
||||
Map<String, RelProvider> discoverers = context.getBeansOfType(RelProvider.class);
|
||||
assertThat(discoverers.values(), hasItem(Matchers.<RelProvider> instanceOf(DelegatingRelProvider.class)));
|
||||
assertThat(discoverers.values(), Matchers.<RelProvider> hasItem(instanceOf(DelegatingRelProvider.class)));
|
||||
}
|
||||
|
||||
@Configuration
|
||||
|
||||
@@ -31,7 +31,7 @@ import org.springframework.hateoas.LinkDiscoverer;
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public abstract class AbstractLinkDiscovererUnitTests {
|
||||
public abstract class AbstractLinkDiscovererUnitTest {
|
||||
|
||||
@Test
|
||||
public void findsSingleLink() {
|
||||
@@ -22,7 +22,7 @@ import org.springframework.hateoas.LinkDiscoverer;
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class DefaultLinkDiscovererUnitTest extends AbstractLinkDiscovererUnitTests {
|
||||
public class DefaultLinkDiscovererUnitTest extends AbstractLinkDiscovererUnitTest {
|
||||
|
||||
static final String SAMPLE = "{ links : [ " + //
|
||||
"{ rel : 'self', href : 'selfHref' }, " + //
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.springframework.plugin.core.PluginRegistry;
|
||||
/**
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class DelegatingRelProviderUnitTests {
|
||||
public class DelegatingRelProviderUnitTest {
|
||||
|
||||
@Test
|
||||
public void foo() {
|
||||
@@ -22,7 +22,7 @@ import org.junit.Test;
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class JsonPathLinkDiscovererUnitTests {
|
||||
public class JsonPathLinkDiscovererUnitTest {
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void rejectsNullPattern() {
|
||||
@@ -35,7 +35,7 @@ import org.springframework.hateoas.core.EvoInflectorRelProvider;
|
||||
* @author Oliver Gierke
|
||||
* @author Dietrich Schulten
|
||||
*/
|
||||
public class HalEmbeddedBuilderUnitTests {
|
||||
public class HalEmbeddedBuilderUnitTest {
|
||||
|
||||
RelProvider provider;
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
package org.springframework.hateoas.hal;
|
||||
|
||||
import org.springframework.hateoas.LinkDiscoverer;
|
||||
import org.springframework.hateoas.core.AbstractLinkDiscovererUnitTests;
|
||||
import org.springframework.hateoas.core.AbstractLinkDiscovererUnitTest;
|
||||
|
||||
/**
|
||||
* Unit tests for {@link HalLinkDiscoverer}.
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class HalLinkDiscovererUnitTest extends AbstractLinkDiscovererUnitTests {
|
||||
public class HalLinkDiscovererUnitTest extends AbstractLinkDiscovererUnitTest {
|
||||
|
||||
static final LinkDiscoverer discoverer = new HalLinkDiscoverer();
|
||||
static final String SAMPLE = "{ _links : { " + //
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.List;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.hateoas.AbstractMarshallingIntegrationTests;
|
||||
import org.springframework.hateoas.AbstractMarshallingIntegrationTest;
|
||||
import org.springframework.hateoas.Link;
|
||||
import org.springframework.hateoas.Links;
|
||||
import org.springframework.hateoas.PagedResources;
|
||||
@@ -40,7 +40,7 @@ import org.springframework.hateoas.hal.Jackson1HalModule.HalHandlerInstantiator;
|
||||
* @author Alexander Baetz
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class Jackson1HalIntegrationTest extends AbstractMarshallingIntegrationTests {
|
||||
public class Jackson1HalIntegrationTest extends AbstractMarshallingIntegrationTest {
|
||||
|
||||
static final String SINGLE_LINK_REFERENCE = "{\"_links\":{\"self\":{\"href\":\"localhost\"}}}";
|
||||
static final String LIST_LINK_REFERENCE = "{\"_links\":{\"self\":[{\"href\":\"localhost\"},{\"href\":\"localhost2\"}]}}";
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.List;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.hateoas.AbstractJackson2MarshallingIntegrationTests;
|
||||
import org.springframework.hateoas.AbstractJackson2MarshallingIntegrationTest;
|
||||
import org.springframework.hateoas.Link;
|
||||
import org.springframework.hateoas.Links;
|
||||
import org.springframework.hateoas.PagedResources;
|
||||
@@ -40,7 +40,7 @@ import org.springframework.hateoas.hal.Jackson2HalModule.HalHandlerInstantiator;
|
||||
* @author Alexander Baetz
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class Jackson2HalIntegrationTest extends AbstractJackson2MarshallingIntegrationTests {
|
||||
public class Jackson2HalIntegrationTest extends AbstractJackson2MarshallingIntegrationTest {
|
||||
|
||||
static final String SINGLE_LINK_REFERENCE = "{\"_links\":{\"self\":{\"href\":\"localhost\"}}}";
|
||||
static final String LIST_LINK_REFERENCE = "{\"_links\":{\"self\":[{\"href\":\"localhost\"},{\"href\":\"localhost2\"}]}}";
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.springframework.http.ResponseEntity;
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class HeaderLinksResponseEntityUnitTests {
|
||||
public class HeaderLinksResponseEntityUnitTest {
|
||||
|
||||
static final Object CONTENT = new Object();
|
||||
static final Link LINK = new Link("href", "rel");
|
||||
Reference in New Issue
Block a user