Skip to content

Commit 85984f3

Browse files
committed
Mark Castor tests as deprecated
Issue: SPR-16219
1 parent c782075 commit 85984f3

File tree

3 files changed

+12
-37
lines changed

3 files changed

+12
-37
lines changed

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

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,15 +16,10 @@
1616

1717
package org.springframework.oxm.castor;
1818

19-
import static org.junit.Assert.*;
20-
import static org.mockito.Mockito.*;
21-
import static org.xmlunit.matchers.CompareMatcher.*;
22-
2319
import java.io.StringWriter;
2420
import java.util.Arrays;
2521
import java.util.HashMap;
2622
import java.util.Map;
27-
2823
import javax.xml.transform.Source;
2924
import javax.xml.transform.sax.SAXResult;
3025
import javax.xml.transform.stream.StreamResult;
@@ -42,13 +37,18 @@
4237
import org.springframework.core.io.ClassPathResource;
4338
import org.springframework.oxm.AbstractMarshallerTests;
4439

40+
import static org.junit.Assert.*;
41+
import static org.mockito.Mockito.*;
42+
import static org.xmlunit.matchers.CompareMatcher.*;
43+
4544
/**
4645
* Tests the {@link CastorMarshaller} class.
4746
*
4847
* @author Arjen Poutsma
4948
* @author Jakub Narloch
5049
* @author Sam Brannen
5150
*/
51+
@Deprecated
5252
public class CastorMarshallerTests extends AbstractMarshallerTests<CastorMarshaller> {
5353

5454
/**

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,13 @@
2525

2626
import org.junit.Ignore;
2727
import org.junit.Test;
28+
import org.xml.sax.InputSource;
29+
import org.xml.sax.XMLReader;
2830

2931
import org.springframework.core.io.ClassPathResource;
3032
import org.springframework.oxm.AbstractUnmarshallerTests;
3133
import org.springframework.oxm.MarshallingException;
3234

33-
import org.xml.sax.InputSource;
34-
import org.xml.sax.XMLReader;
35-
3635
import static org.hamcrest.CoreMatchers.*;
3736
import static org.junit.Assert.*;
3837

@@ -41,6 +40,7 @@
4140
* @author Jakub Narloch
4241
* @author Sam Brannen
4342
*/
43+
@Deprecated
4444
public class CastorUnmarshallerTests extends AbstractUnmarshallerTests<CastorMarshaller> {
4545

4646
/**
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,7 +20,6 @@
2020

2121
import org.springframework.context.ApplicationContext;
2222
import org.springframework.context.support.ClassPathXmlApplicationContext;
23-
import org.springframework.oxm.castor.CastorMarshaller;
2423
import org.springframework.oxm.jaxb.Jaxb2Marshaller;
2524

2625
import static org.junit.Assert.*;
@@ -39,39 +38,15 @@ public class OxmNamespaceHandlerTests {
3938

4039

4140
@Test
42-
public void jaxb2ContextPathMarshaller() throws Exception {
41+
public void jaxb2ContextPathMarshaller() {
4342
Jaxb2Marshaller jaxb2Marshaller = applicationContext.getBean("jaxb2ContextPathMarshaller", Jaxb2Marshaller.class);
4443
assertNotNull(jaxb2Marshaller);
4544
}
4645

4746
@Test
48-
public void jaxb2ClassesToBeBoundMarshaller() throws Exception {
47+
public void jaxb2ClassesToBeBoundMarshaller() {
4948
Jaxb2Marshaller jaxb2Marshaller = applicationContext.getBean("jaxb2ClassesMarshaller", Jaxb2Marshaller.class);
5049
assertNotNull(jaxb2Marshaller);
5150
}
5251

53-
@Test
54-
public void castorEncodingMarshaller() throws Exception {
55-
CastorMarshaller castorMarshaller = applicationContext.getBean("castorEncodingMarshaller", CastorMarshaller.class);
56-
assertNotNull(castorMarshaller);
57-
}
58-
59-
@Test
60-
public void castorTargetClassMarshaller() throws Exception {
61-
CastorMarshaller castorMarshaller = applicationContext.getBean("castorTargetClassMarshaller", CastorMarshaller.class);
62-
assertNotNull(castorMarshaller);
63-
}
64-
65-
@Test
66-
public void castorTargetPackageMarshaller() throws Exception {
67-
CastorMarshaller castorMarshaller = applicationContext.getBean("castorTargetPackageMarshaller", CastorMarshaller.class);
68-
assertNotNull(castorMarshaller);
69-
}
70-
71-
@Test
72-
public void castorMappingLocationMarshaller() throws Exception {
73-
CastorMarshaller castorMarshaller = applicationContext.getBean("castorMappingLocationMarshaller", CastorMarshaller.class);
74-
assertNotNull(castorMarshaller);
75-
}
76-
7752
}

0 commit comments

Comments
 (0)