Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JSTEP-10] Move /failing tests #709

Merged
merged 5 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,6 @@ alternative support for serializing POJOs as XML and deserializing XML as pojos.
<artifactId>maven-surefire-plugin</artifactId>
<version>${version.plugin.surefire}</version>
<configuration>
<excludes>
<exclude>**/failing/**/*.java</exclude>
</excludes>
<includes>
<include>**/Test*.java</include>
<include>**/*Test.java</include>
Comment on lines 193 to 194
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if we still need these 🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I don't think so, @Test is better

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will remove after merging.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fasterxml.jackson.dataformat.xml.failing;
package com.fasterxml.jackson.dataformat.xml.tofix;

import org.junit.jupiter.api.Test;

Expand All @@ -8,6 +8,7 @@
import com.fasterxml.jackson.dataformat.xml.XmlTestUtil;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.testutil.failure.JacksonTestFailureExpected;

import static org.junit.jupiter.api.Assertions.assertNotNull;

Expand Down Expand Up @@ -54,6 +55,7 @@ public BeanInfo() { }
*/

// [dataformat-xml#27]
@JacksonTestFailureExpected
@Test
public void testIssue27() throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fasterxml.jackson.dataformat.xml.failing;
package com.fasterxml.jackson.dataformat.xml.tofix;

import java.util.Arrays;
import java.util.List;
Expand All @@ -12,6 +12,7 @@
import com.fasterxml.jackson.dataformat.xml.XmlTestUtil;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.testutil.failure.JacksonTestFailureExpected;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
Expand Down Expand Up @@ -49,6 +50,7 @@ public Body149(@JacksonXmlProperty(localName="type")
private final ObjectMapper MAPPER = newMapper();

// [dataformat-xml#149]
@JacksonTestFailureExpected
@Test
public void testElementWrapper149() throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package com.fasterxml.jackson.dataformat.xml.failing;
package com.fasterxml.jackson.dataformat.xml.tofix;

import org.junit.jupiter.api.Test;

import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
import com.fasterxml.jackson.dataformat.xml.XmlTestUtil;
import com.fasterxml.jackson.dataformat.xml.testutil.failure.JacksonTestFailureExpected;

import static org.junit.jupiter.api.Assertions.*;

Expand Down Expand Up @@ -32,6 +33,7 @@ public UntypedEnumBean() { }

private final XmlMapper MAPPER = newMapper();

@JacksonTestFailureExpected
@Test
public void testUntypedEnum() throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fasterxml.jackson.dataformat.xml.failing;
package com.fasterxml.jackson.dataformat.xml.tofix;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
Expand All @@ -15,6 +15,7 @@
import com.fasterxml.jackson.databind.AnnotationIntrospector;
import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector;
import com.fasterxml.jackson.dataformat.xml.*;
import com.fasterxml.jackson.dataformat.xml.testutil.failure.JacksonTestFailureExpected;

import static org.junit.jupiter.api.Assertions.assertEquals;

Expand Down Expand Up @@ -125,6 +126,7 @@ public void setUp() throws Exception
/**********************************************************************
*/

@JacksonTestFailureExpected
@Test
public void testSimpleKeyMap() throws Exception
{
Expand All @@ -135,6 +137,7 @@ public void testSimpleKeyMap() throws Exception
_jaxbMapper.writeValueAsString(bean));
}

@JacksonTestFailureExpected
@Test
public void testNeedEncodingKeyMap() throws Exception
{
Expand All @@ -147,6 +150,7 @@ public void testNeedEncodingKeyMap() throws Exception
xml);
}

@JacksonTestFailureExpected
@Test
public void testSimpleKeyMapSimpleAnnotation() throws Exception
{
Expand All @@ -158,6 +162,7 @@ public void testSimpleKeyMapSimpleAnnotation() throws Exception
_jaxbMapper.writeValueAsString(bean));
}

@JacksonTestFailureExpected
@Test
public void testNeedEncodingKeyMapSimpleAnnotation() throws Exception
{
Expand All @@ -169,6 +174,7 @@ public void testNeedEncodingKeyMapSimpleAnnotation() throws Exception
_jaxbMapper.writeValueAsString(bean));
}

@JacksonTestFailureExpected
@Test
public void testNeedEncodingKeyMap_nonJaxb() throws Exception
{
Expand All @@ -180,6 +186,7 @@ public void testNeedEncodingKeyMap_nonJaxb() throws Exception
_nonJaxbMapper.writeValueAsString(bean));
}

@JacksonTestFailureExpected
@Test
public void testNeedEncodingKeyMapSimpleAnnotation_nonJaxb() throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.fasterxml.jackson.dataformat.xml.failing;
package com.fasterxml.jackson.dataformat.xml.tofix;

import org.junit.jupiter.api.Test;

import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonRootName;

import com.fasterxml.jackson.dataformat.xml.XmlMapper;
import com.fasterxml.jackson.dataformat.xml.XmlTestUtil;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.testutil.failure.JacksonTestFailureExpected;

import static org.junit.jupiter.api.Assertions.assertEquals;

Expand Down Expand Up @@ -39,6 +39,7 @@ static class Container {

private final XmlMapper MAPPER = newMapper();

@JacksonTestFailureExpected
@Test
public void testAttributeDeser128() throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package com.fasterxml.jackson.dataformat.xml.failing;
package com.fasterxml.jackson.dataformat.xml.tofix;

import org.junit.jupiter.api.Test;

import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
import com.fasterxml.jackson.dataformat.xml.XmlTestUtil;
import com.fasterxml.jackson.dataformat.xml.testutil.failure.JacksonTestFailureExpected;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
Expand Down Expand Up @@ -76,6 +77,7 @@ public ClassArrayWrapper() { }
*/
// Does not work since array wrapping is not explicitly forced (unlike with collection
// property of a bean
@JacksonTestFailureExpected
@Test
public void testAsClassArray() throws Exception
{
Expand All @@ -88,6 +90,7 @@ public void testAsClassArray() throws Exception

// Hmmh. Does not yet quite work either, since we do not properly force
// array context when writing...
@JacksonTestFailureExpected
@Test
public void testAsWrappedClassArray() throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fasterxml.jackson.dataformat.xml.failing;
package com.fasterxml.jackson.dataformat.xml.tofix;

import java.io.IOException;
import java.util.List;
Expand All @@ -14,6 +14,7 @@
import com.fasterxml.jackson.dataformat.xml.XmlTestUtil;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.testutil.failure.JacksonTestFailureExpected;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
Expand Down Expand Up @@ -89,6 +90,7 @@ public JsonTypeInfo.Id getMechanism() {
private final ObjectMapper MAPPER = newMapper();

// [dataformat-xml#426]
@JacksonTestFailureExpected
@Test
public void testPolymorphicList426() throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fasterxml.jackson.dataformat.xml.failing;
package com.fasterxml.jackson.dataformat.xml.tofix;

import java.util.*;

Expand All @@ -10,6 +10,7 @@

import com.fasterxml.jackson.dataformat.xml.XmlTestUtil;
import com.fasterxml.jackson.dataformat.xml.annotation.*;
import com.fasterxml.jackson.dataformat.xml.testutil.failure.JacksonTestFailureExpected;

import static org.junit.jupiter.api.Assertions.assertEquals;

Expand Down Expand Up @@ -92,6 +93,7 @@ static class Base {

private final ObjectMapper XML_MAPPER = newMapper();

@JacksonTestFailureExpected
@Test
public void test_3itemsInXml_expect_3itemsInDeserializedObject() throws Exception {
String xmlString =
Expand All @@ -106,6 +108,7 @@ public void test_3itemsInXml_expect_3itemsInDeserializedObject() throws Exceptio
assertEquals(3, ((Wrapper)base).getItems().size());
}

@JacksonTestFailureExpected
@Test
public void test_2itemsInObject_expect_2itemsInObjectAfterRoundTripDeserializationToBaseClass() throws Exception {
Wrapper wrapper = new Wrapper();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fasterxml.jackson.dataformat.xml.failing;
package com.fasterxml.jackson.dataformat.xml.tofix;

import java.util.List;

Expand All @@ -7,6 +7,7 @@
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.dataformat.xml.XmlTestUtil;
import com.fasterxml.jackson.dataformat.xml.testutil.failure.JacksonTestFailureExpected;

import static org.junit.jupiter.api.Assertions.assertEquals;

Expand Down Expand Up @@ -46,6 +47,7 @@ static class BindingInfo525 {
.defaultUseWrapper(false)
.build();

@JacksonTestFailureExpected
@Test
public void testTypeAfterOtherProperties() throws Exception {
String xml =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fasterxml.jackson.dataformat.xml.failing;
package com.fasterxml.jackson.dataformat.xml.tofix;

import java.io.IOException;
import java.util.ArrayList;
Expand All @@ -9,6 +9,7 @@
import com.fasterxml.jackson.annotation.JsonRootName;
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
import com.fasterxml.jackson.dataformat.xml.XmlTestUtil;
import com.fasterxml.jackson.dataformat.xml.testutil.failure.JacksonTestFailureExpected;

import static org.junit.jupiter.api.Assertions.assertEquals;

Expand Down Expand Up @@ -52,6 +53,7 @@ public TypedListBean() {
* For [dataformat-xml#8] -- Will not use wrapping, if type is not statically known
* to be a Collection
*/
@JacksonTestFailureExpected
@Test
public void testListAsObject() throws IOException
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fasterxml.jackson.dataformat.xml.failing;
package com.fasterxml.jackson.dataformat.xml.tofix;

import java.util.ArrayList;
import java.util.List;
Expand All @@ -10,6 +10,7 @@

import com.fasterxml.jackson.dataformat.xml.XmlTestUtil;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.testutil.failure.JacksonTestFailureExpected;

import static org.junit.jupiter.api.Assertions.assertEquals;

Expand All @@ -34,6 +35,7 @@ static class Header {

private final ObjectMapper MAPPER = newMapper();

@JacksonTestFailureExpected
@Test
public void testXmlMarshallingAndUnmarshalling() throws Exception {
final Request request = new Request();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package com.fasterxml.jackson.dataformat.xml.failing;
package com.fasterxml.jackson.dataformat.xml.tofix;

import org.junit.jupiter.api.Test;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

import com.fasterxml.jackson.dataformat.xml.XmlTestUtil;
import com.fasterxml.jackson.dataformat.xml.testutil.failure.JacksonTestFailureExpected;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.fail;
Expand All @@ -26,6 +27,7 @@ static class Root {
private final ObjectMapper MAPPER = newMapper();

// [dataformat-xml#247]
@JacksonTestFailureExpected
@Test
public void testRootNameValidation247() throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fasterxml.jackson.dataformat.xml.failing;
package com.fasterxml.jackson.dataformat.xml.tofix;

import java.beans.ConstructorProperties;

Expand All @@ -11,6 +11,7 @@
import com.fasterxml.jackson.dataformat.xml.XmlTestUtil;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlText;
import com.fasterxml.jackson.dataformat.xml.testutil.failure.JacksonTestFailureExpected;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
Expand Down Expand Up @@ -96,6 +97,7 @@ public Sample423(@JacksonXmlText String text,
private final XmlMapper MAPPER = newMapper();

// [dataformat-xml#306]
@JacksonTestFailureExpected
@Test
public void testIssue306WithCtor() throws Exception
{
Expand All @@ -113,6 +115,7 @@ public void testIssue306NoCtor() throws Exception
}

// [dataformat-xml#423]
@JacksonTestFailureExpected
@Test
public void testXmlTextViaCtor423() throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fasterxml.jackson.dataformat.xml.failing;
package com.fasterxml.jackson.dataformat.xml.tofix;

import java.util.List;

Expand All @@ -11,6 +11,7 @@
import com.fasterxml.jackson.dataformat.xml.XmlTestUtil;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlText;
import com.fasterxml.jackson.dataformat.xml.testutil.failure.JacksonTestFailureExpected;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
Expand All @@ -35,6 +36,7 @@ static class Text449 {
private final XmlMapper MAPPER = newMapper();

// [dataformat-xml#449]
@JacksonTestFailureExpected
@Test
public void testXmlText449ItemWithAttr() throws Exception
{
Expand All @@ -53,6 +55,7 @@ public void testXmlText449ItemWithAttr() throws Exception
}

// [dataformat-xml#449]
@JacksonTestFailureExpected
@Test
public void testXmlText449ItemWithList() throws Exception
{
Expand Down