X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Ftest%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2FMatchers.java;h=823cdf9e4e06464c81512ef8d0e8d6ca9efa8237;hp=c16322c90f46db60eaf18e4775bf3044267e26aa;hb=7b55e0be6a3283e43a9bbab98f82aebdd948eb33;hpb=0e8f7804ce344bdd69f5ecc7febe25a60a53561d diff --git a/src/test/java/net/pterodactylus/sone/Matchers.java b/src/test/java/net/pterodactylus/sone/Matchers.java index c16322c..823cdf9 100644 --- a/src/test/java/net/pterodactylus/sone/Matchers.java +++ b/src/test/java/net/pterodactylus/sone/Matchers.java @@ -1,5 +1,5 @@ /* - * Sone - Matchers.java - Copyright © 2013 David Roden + * Sone - Matchers.java - Copyright © 2013–2016 David Roden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -109,8 +109,7 @@ public class Matchers { public static Matcher isAlbum(final String albumId, final String parentAlbumId, - final String title, final String albumDescription, - final String imageId) { + final String title, final String albumDescription) { return new TypeSafeDiagnosingMatcher() { @Override protected boolean matchesSafely(Album album, @@ -146,22 +145,6 @@ public class Matchers { .appendValue(album.getDescription()); return false; } - if (imageId == null) { - if (album.getAlbumImage() != null) { - mismatchDescription.appendText("has album image"); - return false; - } - } else { - if (album.getAlbumImage() == null) { - mismatchDescription.appendText("has no album image"); - return false; - } - if (!album.getAlbumImage().getId().equals(imageId)) { - mismatchDescription.appendText("has album image ") - .appendValue(album.getAlbumImage().getId()); - return false; - } - } return true; } @@ -177,12 +160,6 @@ public class Matchers { description.appendText(", has title ").appendValue(title); description.appendText(", has description ") .appendValue(albumDescription); - if (imageId == null) { - description.appendText(", has no album image"); - } else { - description.appendText(", has album image ") - .appendValue(imageId); - } } }; }