+ @Test
+ fun `notEmpty finds album without images is empty`() {
+ val sone = IdOnlySone("sone")
+ val album = AlbumImpl(sone)
+ assertThat(notEmpty(album), equalTo(false))
+ }
+
+ @Test
+ fun `notEmpty finds album with one inserted image is not empty`() {
+ val sone = IdOnlySone("sone")
+ val album = AlbumImpl(sone)
+ album.addImage(createImage(sone, "1", "key"))
+ assertThat(notEmpty(album), equalTo(true))
+ }
+
+ @Test
+ fun `notEmpty finds album with one not-inserted image is empty`() {
+ val sone = IdOnlySone("sone")
+ val album = AlbumImpl(sone)
+ album.addImage(createImage(sone, "1"))
+ assertThat(notEmpty(album), equalTo(false))
+ }
+
+ @Test
+ fun `notEmpty finds album with empty subalbums is empty`() {
+ val sone = IdOnlySone("sone")
+ val album = AlbumImpl(sone)
+ val firstNestedAlbum = AlbumImpl(sone)
+ album.addAlbum(firstNestedAlbum)
+ assertThat(notEmpty(album), equalTo(false))
+ }
+
+ @Test
+ fun `notEmpty finds album with subalbum with not inserted image is empty`() {
+ val sone = IdOnlySone("sone")
+ val album = AlbumImpl(sone)
+ val firstNestedAlbum = AlbumImpl(sone)
+ firstNestedAlbum.addImage(createImage(sone, "1"))
+ album.addAlbum(firstNestedAlbum)
+ assertThat(notEmpty(album), equalTo(false))
+ }
+
+ @Test
+ fun `notEmpty finds album with subalbum with inserted image is not empty`() {
+ val sone = IdOnlySone("sone")
+ val album = AlbumImpl(sone)
+ val firstNestedAlbum = AlbumImpl(sone)
+ firstNestedAlbum.addImage(createImage(sone, "1", "key"))
+ album.addAlbum(firstNestedAlbum)
+ assertThat(notEmpty(album), equalTo(true))
+ }
+