Browse Source

Mark Castor tests as deprecated

Issue: SPR-16219
pull/1702/head
Juergen Hoeller 8 years ago
parent
commit
85984f3b72
  1. 12
      spring-oxm/src/test/java/org/springframework/oxm/castor/CastorMarshallerTests.java
  2. 6
      spring-oxm/src/test/java/org/springframework/oxm/castor/CastorUnmarshallerTests.java
  3. 31
      spring-oxm/src/test/java/org/springframework/oxm/config/OxmNamespaceHandlerTests.java

12
spring-oxm/src/test/java/org/springframework/oxm/castor/CastorMarshallerTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,15 +16,10 @@ @@ -16,15 +16,10 @@
package org.springframework.oxm.castor;
import static org.junit.Assert.*;
import static org.mockito.Mockito.*;
import static org.xmlunit.matchers.CompareMatcher.*;
import java.io.StringWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import javax.xml.transform.Source;
import javax.xml.transform.sax.SAXResult;
import javax.xml.transform.stream.StreamResult;
@ -42,6 +37,10 @@ import org.xmlunit.xpath.JAXPXPathEngine; @@ -42,6 +37,10 @@ import org.xmlunit.xpath.JAXPXPathEngine;
import org.springframework.core.io.ClassPathResource;
import org.springframework.oxm.AbstractMarshallerTests;
import static org.junit.Assert.*;
import static org.mockito.Mockito.*;
import static org.xmlunit.matchers.CompareMatcher.*;
/**
* Tests the {@link CastorMarshaller} class.
*
@ -49,6 +48,7 @@ import org.springframework.oxm.AbstractMarshallerTests; @@ -49,6 +48,7 @@ import org.springframework.oxm.AbstractMarshallerTests;
* @author Jakub Narloch
* @author Sam Brannen
*/
@Deprecated
public class CastorMarshallerTests extends AbstractMarshallerTests<CastorMarshaller> {
/**

6
spring-oxm/src/test/java/org/springframework/oxm/castor/CastorUnmarshallerTests.java

@ -25,14 +25,13 @@ import javax.xml.transform.stream.StreamSource; @@ -25,14 +25,13 @@ import javax.xml.transform.stream.StreamSource;
import org.junit.Ignore;
import org.junit.Test;
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;
import org.springframework.core.io.ClassPathResource;
import org.springframework.oxm.AbstractUnmarshallerTests;
import org.springframework.oxm.MarshallingException;
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;
@ -41,6 +40,7 @@ import static org.junit.Assert.*; @@ -41,6 +40,7 @@ import static org.junit.Assert.*;
* @author Jakub Narloch
* @author Sam Brannen
*/
@Deprecated
public class CastorUnmarshallerTests extends AbstractUnmarshallerTests<CastorMarshaller> {
/**

31
spring-oxm/src/test/java/org/springframework/oxm/config/OxmNamespaceHandlerTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -20,7 +20,6 @@ import org.junit.Test; @@ -20,7 +20,6 @@ import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.oxm.castor.CastorMarshaller;
import org.springframework.oxm.jaxb.Jaxb2Marshaller;
import static org.junit.Assert.*;
@ -39,39 +38,15 @@ public class OxmNamespaceHandlerTests { @@ -39,39 +38,15 @@ public class OxmNamespaceHandlerTests {
@Test
public void jaxb2ContextPathMarshaller() throws Exception {
public void jaxb2ContextPathMarshaller() {
Jaxb2Marshaller jaxb2Marshaller = applicationContext.getBean("jaxb2ContextPathMarshaller", Jaxb2Marshaller.class);
assertNotNull(jaxb2Marshaller);
}
@Test
public void jaxb2ClassesToBeBoundMarshaller() throws Exception {
public void jaxb2ClassesToBeBoundMarshaller() {
Jaxb2Marshaller jaxb2Marshaller = applicationContext.getBean("jaxb2ClassesMarshaller", Jaxb2Marshaller.class);
assertNotNull(jaxb2Marshaller);
}
@Test
public void castorEncodingMarshaller() throws Exception {
CastorMarshaller castorMarshaller = applicationContext.getBean("castorEncodingMarshaller", CastorMarshaller.class);
assertNotNull(castorMarshaller);
}
@Test
public void castorTargetClassMarshaller() throws Exception {
CastorMarshaller castorMarshaller = applicationContext.getBean("castorTargetClassMarshaller", CastorMarshaller.class);
assertNotNull(castorMarshaller);
}
@Test
public void castorTargetPackageMarshaller() throws Exception {
CastorMarshaller castorMarshaller = applicationContext.getBean("castorTargetPackageMarshaller", CastorMarshaller.class);
assertNotNull(castorMarshaller);
}
@Test
public void castorMappingLocationMarshaller() throws Exception {
CastorMarshaller castorMarshaller = applicationContext.getBean("castorMappingLocationMarshaller", CastorMarshaller.class);
assertNotNull(castorMarshaller);
}
}

Loading…
Cancel
Save