Skip to content

Commit

Permalink
binary id
Browse files Browse the repository at this point in the history
  • Loading branch information
rodireich committed May 9, 2024
1 parent ec075b6 commit bdb083f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import org.bson.types.ObjectId;
import org.junit.jupiter.api.Test;

import java.util.UUID;

class IdTypeTest {

@Test
Expand All @@ -17,6 +19,7 @@ void convert() {
assertEquals(202L, IdType.LONG.convert("202"));
assertEquals("example", IdType.STRING.convert("example"));
assertEquals(new ObjectId("012301230123012301230123"), IdType.OBJECT_ID.convert("012301230123012301230123"));
// assertEquals(UUID.fromString("8f8c1010-4388-4663-9a58-d0b2a113b81a"), IdType.BINARY.convert("8f8c1010-4388-4663-9a58-d0b2a113b81a"));
}

@Test
Expand All @@ -36,7 +39,7 @@ void findByJavaType() {

@Test
void supported() {
assertEquals("objectId, string, int, long", IdType.SUPPORTED);
assertEquals("objectId, string, int, long, binData", IdType.SUPPORTED);
}

}

0 comments on commit bdb083f

Please sign in to comment.