Use Apache Johnzon 1.1 for JSON-B integration tests
Issue: SPR-15590
This commit is contained in:
		
							parent
							
								
									3cc94ae8b5
								
							
						
					
					
						commit
						e7b41bc30a
					
				| 
						 | 
				
			
			@ -767,6 +767,8 @@ project("spring-web") {
 | 
			
		|||
		testRuntime("com.sun.mail:javax.mail:${javamailVersion}")
 | 
			
		||||
		testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}")
 | 
			
		||||
		testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")
 | 
			
		||||
		testRuntime("javax.json:javax.json-api:1.1")
 | 
			
		||||
		testRuntime("org.apache.johnzon:johnzon-jsonb:1.1.0")
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -24,7 +24,6 @@ import java.util.HashMap;
 | 
			
		|||
import java.util.List;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
 | 
			
		||||
import org.junit.Ignore;
 | 
			
		||||
import org.junit.Test;
 | 
			
		||||
 | 
			
		||||
import org.springframework.core.ParameterizedTypeReference;
 | 
			
		||||
| 
						 | 
				
			
			@ -36,9 +35,11 @@ import org.springframework.http.converter.HttpMessageNotReadableException;
 | 
			
		|||
import static org.junit.Assert.*;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Integration tests for the JSON Binding API, running against Apache Johnzon.
 | 
			
		||||
 *
 | 
			
		||||
 * @author Juergen Hoeller
 | 
			
		||||
 * @since 5.0
 | 
			
		||||
 */
 | 
			
		||||
@Ignore  // until we are able to include Eclipse Yasson (the JSONB RI) in our build setup
 | 
			
		||||
public class JsonbHttpMessageConverterTests {
 | 
			
		||||
 | 
			
		||||
	private final JsonbHttpMessageConverter converter = new JsonbHttpMessageConverter();
 | 
			
		||||
| 
						 | 
				
			
			@ -133,7 +134,7 @@ public class JsonbHttpMessageConverterTests {
 | 
			
		|||
		MockHttpOutputMessage outputMessage = new MockHttpOutputMessage();
 | 
			
		||||
		String body = "H\u00e9llo W\u00f6rld";
 | 
			
		||||
		this.converter.write(body, contentType, outputMessage);
 | 
			
		||||
		assertEquals("Invalid result", "\"" + body + "\"", outputMessage.getBodyAsString(StandardCharsets.UTF_16BE));
 | 
			
		||||
		assertEquals("Invalid result", body, outputMessage.getBodyAsString(StandardCharsets.UTF_16BE));
 | 
			
		||||
		assertEquals("Invalid content-type", contentType, outputMessage.getHeaders().getContentType());
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue