Polish
This commit is contained in:
@@ -31,7 +31,6 @@ import javax.ws.rs.ext.ContextResolver;
|
||||
import javax.ws.rs.ext.Provider;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.glassfish.jersey.CommonProperties;
|
||||
|
||||
@@ -49,8 +49,9 @@ import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
||||
/**
|
||||
* Tests for {@link JerseyAutoConfiguration} when using custom ObjectMapper.
|
||||
*
|
||||
* @author Eddú Meléndez
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@@ -98,10 +99,6 @@ public class JerseyAutoConfigurationCustomObjectMapperProviderTests {
|
||||
|
||||
private String body;
|
||||
|
||||
public Message() {
|
||||
|
||||
}
|
||||
|
||||
public Message(String subject, String body) {
|
||||
this.subject = subject;
|
||||
this.body = body;
|
||||
@@ -122,6 +119,7 @@ public class JerseyAutoConfigurationCustomObjectMapperProviderTests {
|
||||
public void setBody(String body) {
|
||||
this.body = body;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Target(ElementType.TYPE)
|
||||
@@ -131,6 +129,7 @@ public class JerseyAutoConfigurationCustomObjectMapperProviderTests {
|
||||
JacksonAutoConfiguration.class, ServerPropertiesAutoConfiguration.class,
|
||||
JerseyAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class })
|
||||
protected @interface MinimalWebConfiguration {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -50,6 +50,8 @@ import org.springframework.web.client.RestTemplate;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link JerseyAutoConfiguration} with a ObjectMapper.
|
||||
*
|
||||
* @author Eddú Meléndez
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@@ -68,7 +70,8 @@ public class JerseyAutoConfigurationObjectMapperProviderTests {
|
||||
ResponseEntity<String> response = this.restTemplate.getForEntity(
|
||||
"http://localhost:" + this.port + "/rest/message", String.class);
|
||||
assertThat(HttpStatus.OK).isEqualTo(response.getStatusCode());
|
||||
assertThat("{\"subject\":\"Jersey\",\"body\":null}").isEqualTo(response.getBody());
|
||||
assertThat("{\"subject\":\"Jersey\",\"body\":null}")
|
||||
.isEqualTo(response.getBody());
|
||||
}
|
||||
|
||||
@MinimalWebConfiguration
|
||||
@@ -121,6 +124,7 @@ public class JerseyAutoConfigurationObjectMapperProviderTests {
|
||||
public void setBody(String body) {
|
||||
this.body = body;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Target(ElementType.TYPE)
|
||||
@@ -130,6 +134,7 @@ public class JerseyAutoConfigurationObjectMapperProviderTests {
|
||||
JacksonAutoConfiguration.class, ServerPropertiesAutoConfiguration.class,
|
||||
JerseyAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class })
|
||||
protected @interface MinimalWebConfiguration {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user