This repository has been archived by the owner on Jan 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorganizing tests, adding failing test for #74 (not yet certain of i…
…ts validity, but to keep it around)
- Loading branch information
1 parent
5ace8ca
commit 1474827
Showing
2 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/test/java/com/fasterxml/jackson/dataformat/csv/failing/PropertyOrder74Test.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.fasterxml.jackson.dataformat.csv.failing; | ||
|
||
import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
|
||
import com.fasterxml.jackson.dataformat.csv.CsvMapper; | ||
import com.fasterxml.jackson.dataformat.csv.CsvSchema; | ||
import com.fasterxml.jackson.dataformat.csv.ModuleTestBase; | ||
|
||
// For [dataformat-csv#74]: problems applying default do-sort handling | ||
public class PropertyOrder74Test extends ModuleTestBase | ||
{ | ||
static class Point { | ||
public int y; | ||
public int x; | ||
} | ||
|
||
@JsonPropertyOrder() | ||
public static class PointWithAnnotation extends Point {} | ||
|
||
private final CsvMapper MAPPER = new CsvMapper(); | ||
|
||
public void testSchemaWithOrdering() throws Exception | ||
{ | ||
CsvSchema schema1 = MAPPER.schemaFor(Point.class); | ||
CsvSchema schema2 = MAPPER.schemaFor(PointWithAnnotation.class); | ||
|
||
assertEquals(schema1.size(), schema2.size()); | ||
assertEquals(schema1.column(0).getName(), schema2.column(0).getName()); | ||
} | ||
} |