X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fdatabase%2Fmemory%2FMemoryPostTest.kt;fp=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fdatabase%2Fmemory%2FMemoryPostTest.kt;h=611ad70373dadf12d7db99f3c90e34ea56c7e02b;hp=0000000000000000000000000000000000000000;hb=242da074894d2ffcbb1a61f16ed881db9bc51ff0;hpb=5dc729a6e73c1000f22e9fb5dbb75d856c16eb04 diff --git a/src/test/kotlin/net/pterodactylus/sone/database/memory/MemoryPostTest.kt b/src/test/kotlin/net/pterodactylus/sone/database/memory/MemoryPostTest.kt new file mode 100644 index 0000000..611ad70 --- /dev/null +++ b/src/test/kotlin/net/pterodactylus/sone/database/memory/MemoryPostTest.kt @@ -0,0 +1,19 @@ +package net.pterodactylus.sone.database.memory + +import com.google.common.base.Optional.* +import net.pterodactylus.sone.test.* +import org.hamcrest.MatcherAssert.* +import org.hamcrest.Matchers.* +import org.junit.* +import java.util.* + +class MemoryPostTest { + + @Test + fun `memory post returns empty optional for post without recipient`() { + val postDatabase = mock() + val memoryPost = MemoryPost(postDatabase, postDatabase, UUID.randomUUID().toString(), "soneId", null, 123, "text") + assertThat(memoryPost.recipient, equalTo(absent())) + } + +}