philadelphia-core: Improve 'FIXValue#get' tests
@@ -789,13 +789,18 @@ class FIXValueTest {
@Test
void get() {
- get("FOO\u0001");
+ get("FOO\u0001BAR\u0001");
assertEquals("FOO\u0001", put());
}
@Test
- void readOverflow() {
+ void getWithPartial() {
+ assertEquals(false, get("FOO"));
+ }
+
+ @Test
+ void getWithOverflow() {
assertThrows(FIXValueOverflowException.class, () -> value.get(ByteBuffers.wrap("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")));
}
@@ -806,11 +811,6 @@ class FIXValueTest {
assertEquals("FOO|", value.toString());
}
- @Test
- void readPartial() {
- assertEquals(false, get("foo"));
- }
-
private boolean get(String text) {
try {
return value.get(ByteBuffers.wrap(text));
