diff --git a/src/test/kotlin/com/nylas/resources/DraftsTests.kt b/src/test/kotlin/com/nylas/resources/DraftsTests.kt index 0ca3d53f..b6c27bcb 100644 --- a/src/test/kotlin/com/nylas/resources/DraftsTests.kt +++ b/src/test/kotlin/com/nylas/resources/DraftsTests.kt @@ -109,9 +109,9 @@ class DraftsTests { assertEquals(2, draft.folders?.size) assertEquals("8l6c4d11y1p4dm4fxj52whyr9", draft.folders?.first()) assertEquals("d9zkcr2tljpu3m4qpj7l2hbr0", draft.folders?.last()) - assertEquals(1, draft.from.size) - assertEquals("Daenerys Targaryen", draft.from.first().name) - assertEquals("daenerys.t@example.com", draft.from.first().email) + assertEquals(1, draft.from?.size) + assertEquals("Daenerys Targaryen", draft.from?.first()?.name) + assertEquals("daenerys.t@example.com", draft.from?.first()?.email) assertEquals("41009df5-bf11-4c97-aa18-b285b5f2e386", draft.grantId) assertEquals("5d3qmne77v32r8l4phyuksl2x", draft.id) assertEquals("draft", draft.getObject()) diff --git a/src/test/kotlin/com/nylas/resources/MessagesTests.kt b/src/test/kotlin/com/nylas/resources/MessagesTests.kt index db8b302d..62598c70 100644 --- a/src/test/kotlin/com/nylas/resources/MessagesTests.kt +++ b/src/test/kotlin/com/nylas/resources/MessagesTests.kt @@ -108,9 +108,9 @@ class MessagesTests { assertEquals(2, message.folders?.size) assertEquals("8l6c4d11y1p4dm4fxj52whyr9", message.folders?.get(0)) assertEquals("d9zkcr2tljpu3m4qpj7l2hbr0", message.folders?.get(1)) - assertEquals(1, message.from.size) - assertEquals("Daenerys Targaryen", message.from[0].name) - assertEquals("daenerys.t@example.com", message.from[0].email) + assertEquals(1, message.from?.size) + assertEquals("Daenerys Targaryen", message.from?.get(0)?.name) + assertEquals("daenerys.t@example.com", message.from?.get(0)?.email) assertEquals("41009df5-bf11-4c97-aa18-b285b5f2e386", message.grantId) assertEquals("5d3qmne77v32r8l4phyuksl2x", message.id) assertEquals("message", message.getObject())