Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
michel-kraemer committed Sep 23, 2023
1 parent 8a4c307 commit 3125593
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions src/test/java/de/undercouch/bson4jackson/BsonParserTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,21 @@ public static class ObjectIdClass {
public org.bson.types.ObjectId oid;
}

/**
* Test class for {@link BsonParserTest#parseWrappedFloat}
*/
public static class OuterClass {
@JsonUnwrapped
public InnerClass inner = new InnerClass();
}

/**
* Test class for {@link BsonParserTest#parseWrappedFloat}
*/
public static class InnerClass {
public float floatValue = 40.0f;
}

private <T> T parseBsonObject(BSONObject o, Class<T> cls,
Module... modules) throws IOException {
BSONEncoder enc = new BasicBSONEncoder();
Expand Down Expand Up @@ -656,17 +671,8 @@ public void parseMinKey() throws Exception {
assertEquals("MinKey", data.get("A"));
}

static class OuterClass {
@JsonUnwrapped
public InnerClass inner = new InnerClass();
}

static class InnerClass {
public float floatValue = 40.0f;
}

/**
* Test if wrapped floats deserialized. Refers issue #121.
* Test if wrapped floats can be deserialized. Refers issue #121.
* @throws Exception if something goes wrong
*/
@Test
Expand Down

0 comments on commit 3125593

Please sign in to comment.