Add 32-bit int methods to BdfList and BdfDictionary.

We use these a lot so it's useful to have built-in support.

Also refactor BdfList and BdfDictionary so the getters that take default values behave like the other getters. This simplifies the semantics and allows duplicated code to be removed.

Add comprehensive tests for BdfList and BdfDictionary.
This commit is contained in:
akwizgran
2023-02-18 15:54:47 +00:00
parent 7a854e70cb
commit 63172ef2e4
36 changed files with 820 additions and 294 deletions

View File

@@ -651,7 +651,7 @@ public class GroupMessageValidatorTest extends ValidatorTestCase {
MessageType type, BdfList member,
Collection<MessageId> dependencies) throws FormatException {
BdfDictionary d = c.getDictionary();
assertEquals(type.getInt(), d.getLong(KEY_TYPE).intValue());
assertEquals(type.getInt(), d.getInt(KEY_TYPE).intValue());
assertEquals(message.getTimestamp(),
d.getLong(KEY_TIMESTAMP).longValue());
assertFalse(d.getBoolean(KEY_READ));