Skip to content

Commit

Permalink
Add more DBRef test cases in MongoDB
Browse files Browse the repository at this point in the history
  • Loading branch information
ebyhr committed Feb 23, 2022
1 parent 7c81b0e commit cd6ed66
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.Date;

import static java.lang.String.format;
import static java.nio.charset.StandardCharsets.UTF_8;
Expand Down Expand Up @@ -281,6 +282,12 @@ public void testDBRef(Object objectId, String expectedValue, String expectedType
public Object[][] dbRefProvider()
{
return new Object[][] {
{"String type", "varchar 'String type'", "varchar"},
{1234567890, "bigint '1234567890'", "bigint"},
{true, "true", "boolean"},
{12.3f, "double '12.3'", "double"},
{new Date(0), "timestamp '1970-01-01 00:00:00.000'", "timestamp(3)"},
{ImmutableList.of(1), "array[bigint '1']", "array(bigint)"},
{new ObjectId("5126bc054aed4daf9e2ab772"), "ObjectId('5126bc054aed4daf9e2ab772')", "ObjectId"},
};
}
Expand Down

0 comments on commit cd6ed66

Please sign in to comment.