1 package net.pterodactylus.sone.data.impl
3 import net.pterodactylus.sone.data.Image
7 * Unit test for [ImageImpl].
11 private val image = ImageImpl()
13 @Test(expected = Image.Modifier.ImageTitleMustNotBeEmpty::class)
14 fun `modifier does not allow title to be empty`() {
15 image.modify().setTitle("").update()
18 @Test(expected = IllegalStateException::class)
19 fun `album cannot be changed to album of different Sone`() {
20 val sone1 = IdOnlySone("Sone1")
21 val sone2 = IdOnlySone("Sone2")
22 image.modify().setSone(sone1).update()
23 val album = AlbumImpl(sone2)