Skip to content
This repository has been archived by the owner on Jan 22, 2019. It is now read-only.

Commit

Permalink
Reorganizing tests, adding failing test for #74 (not yet certain of i…
Browse files Browse the repository at this point in the history
…ts validity, but to keep it around)
  • Loading branch information
cowtowncoder committed Apr 15, 2015
1 parent 5ace8ca commit 1474827
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

import com.fasterxml.jackson.dataformat.csv.*;

public class TestParserQuotes extends ModuleTestBase
// for [dataformat-csv#19]
public class ParserQuotes19Test extends ModuleTestBase
{
@JsonPropertyOrder({"s1", "s2", "s3"})
protected static class ThreeString {
Expand Down
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());
}
}

0 comments on commit 1474827

Please sign in to comment.