mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-21 15:18:12 +01:00
Remove single URL in favor of density based sprite sheets
This commit is contained in:
@@ -13,8 +13,6 @@ import static org.mockito.Mockito.doReturn;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.time.Clock;
|
||||
import java.time.Instant;
|
||||
import java.util.ArrayList;
|
||||
@@ -56,14 +54,6 @@ public class ConfiguredProfileBadgeConverterTest {
|
||||
return "Badge-" + i;
|
||||
}
|
||||
|
||||
private static URL imageUrlFor(int i) {
|
||||
try {
|
||||
return new URL("https://example.com/badge/" + i);
|
||||
} catch (MalformedURLException e) {
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
}
|
||||
|
||||
private static String nameFor(int i) {
|
||||
return "TRANSLATED NAME " + i;
|
||||
}
|
||||
@@ -73,7 +63,7 @@ public class ConfiguredProfileBadgeConverterTest {
|
||||
}
|
||||
|
||||
private static BadgeConfiguration newBadge(int i) {
|
||||
return new BadgeConfiguration(idFor(i), imageUrlFor(i), "other");
|
||||
return new BadgeConfiguration(idFor(i), "other", "l", "m", "h", "x", "xx", "xxx");
|
||||
}
|
||||
|
||||
private BadgesConfiguration createBadges(int count) {
|
||||
@@ -143,15 +133,15 @@ public class ConfiguredProfileBadgeConverterTest {
|
||||
arguments(idFor(0), expired, false, false, null),
|
||||
arguments(idFor(0), notExpired, false, false, null),
|
||||
arguments(idFor(0), expired, true, false, null),
|
||||
arguments(idFor(0), notExpired, true, false, new Badge(idFor(0), "other", imageUrlFor(0), nameFor(0), desriptionFor(0))),
|
||||
arguments(idFor(0), notExpired, true, false, new Badge(idFor(0), "other", nameFor(0), desriptionFor(0), "l", "m", "h", "x", "xx", "xxx")),
|
||||
arguments(idFor(1), expired, false, false, null),
|
||||
arguments(idFor(1), notExpired, false, false, null),
|
||||
arguments(idFor(1), expired, true, false, null),
|
||||
arguments(idFor(1), notExpired, true, false, null),
|
||||
arguments(idFor(0), expired, false, true, null),
|
||||
arguments(idFor(0), notExpired, false, true, new SelfBadge(idFor(0), "other", imageUrlFor(0), nameFor(0), desriptionFor(0), notExpired, false)),
|
||||
arguments(idFor(0), notExpired, false, true, new SelfBadge(idFor(0), "other", nameFor(0), desriptionFor(0), "l", "m", "h", "x", "xx", "xxx", notExpired, false)),
|
||||
arguments(idFor(0), expired, true, true, null),
|
||||
arguments(idFor(0), notExpired, true, true, new SelfBadge(idFor(0), "other", imageUrlFor(0), nameFor(0), desriptionFor(0), notExpired, true)),
|
||||
arguments(idFor(0), notExpired, true, true, new SelfBadge(idFor(0), "other", nameFor(0), desriptionFor(0), "l", "m", "h", "x", "xx", "xxx", notExpired, true)),
|
||||
arguments(idFor(1), expired, false, true, null),
|
||||
arguments(idFor(1), notExpired, false, true, null),
|
||||
arguments(idFor(1), expired, true, true, null),
|
||||
|
||||
Reference in New Issue
Block a user