From 8230a34cdb7e2ee5f796008f66e99a45160f5d1d Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 12 Oct 2013 17:35:38 +0200 Subject: [PATCH] Store DefaultAlbum in DefaultImage. --- src/main/java/net/pterodactylus/sone/data/impl/DefaultImage.java | 4 ++-- .../java/net/pterodactylus/sone/data/impl/DefaultImageBuilder.java | 5 ++--- .../net/pterodactylus/sone/data/impl/DefaultImageBuilderTest.java | 3 +-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/data/impl/DefaultImage.java b/src/main/java/net/pterodactylus/sone/data/impl/DefaultImage.java index 085091a..54e6495 100644 --- a/src/main/java/net/pterodactylus/sone/data/impl/DefaultImage.java +++ b/src/main/java/net/pterodactylus/sone/data/impl/DefaultImage.java @@ -29,9 +29,9 @@ import net.pterodactylus.sone.data.Sone; public class DefaultImage extends AbstractImage { private final Sone sone; - private final Album album; + private final DefaultAlbum album; - public DefaultImage(String id, Sone sone, Album album, String key, long creationTime, int width, int height) { + public DefaultImage(String id, Sone sone, DefaultAlbum album, String key, long creationTime, int width, int height) { super(id, key, creationTime, width, height); this.sone = sone; this.album = album; diff --git a/src/main/java/net/pterodactylus/sone/data/impl/DefaultImageBuilder.java b/src/main/java/net/pterodactylus/sone/data/impl/DefaultImageBuilder.java index b53095f..12f20c2 100644 --- a/src/main/java/net/pterodactylus/sone/data/impl/DefaultImageBuilder.java +++ b/src/main/java/net/pterodactylus/sone/data/impl/DefaultImageBuilder.java @@ -19,7 +19,6 @@ package net.pterodactylus.sone.data.impl; import static com.google.common.base.Preconditions.checkNotNull; -import net.pterodactylus.sone.data.Album; import net.pterodactylus.sone.data.Image; import net.pterodactylus.sone.data.Sone; import net.pterodactylus.sone.database.ImageBuilder; @@ -32,9 +31,9 @@ import net.pterodactylus.sone.database.ImageBuilder; public class DefaultImageBuilder extends AbstractImageBuilder { protected final Sone sone; - protected final Album album; + protected final DefaultAlbum album; - public DefaultImageBuilder(Sone sone, Album album) { + public DefaultImageBuilder(Sone sone, DefaultAlbum album) { this.sone = checkNotNull(sone, "sone must not be null"); this.album = checkNotNull(album, "album must not be null"); } diff --git a/src/test/java/net/pterodactylus/sone/data/impl/DefaultImageBuilderTest.java b/src/test/java/net/pterodactylus/sone/data/impl/DefaultImageBuilderTest.java index eac5287..2f00735 100644 --- a/src/test/java/net/pterodactylus/sone/data/impl/DefaultImageBuilderTest.java +++ b/src/test/java/net/pterodactylus/sone/data/impl/DefaultImageBuilderTest.java @@ -22,7 +22,6 @@ import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.MatcherAssert.assertThat; import static org.mockito.Mockito.mock; -import net.pterodactylus.sone.data.Album; import net.pterodactylus.sone.data.Image; import net.pterodactylus.sone.data.Sone; import net.pterodactylus.sone.database.ImageBuilder; @@ -44,7 +43,7 @@ public class DefaultImageBuilderTest { private static final int HEIGHT = 270; private final Sone sone = mock(Sone.class); - private final Album album = mock(Album.class); + private final DefaultAlbum album = mock(DefaultAlbum.class); private final ImageBuilder imageBuilder = new DefaultImageBuilder(sone, album); @Test -- 2.7.4