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;
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;
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");
}
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;
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