mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-21 15:18:12 +01:00
Clean up testing with clocks.
This commit is contained in:
@@ -37,21 +37,19 @@ import org.whispersystems.textsecuregcm.entities.Badge;
|
||||
import org.whispersystems.textsecuregcm.entities.BadgeSvg;
|
||||
import org.whispersystems.textsecuregcm.entities.SelfBadge;
|
||||
import org.whispersystems.textsecuregcm.storage.AccountBadge;
|
||||
import org.whispersystems.textsecuregcm.util.TestClock;
|
||||
|
||||
public class ConfiguredProfileBadgeConverterTest {
|
||||
|
||||
private Clock clock;
|
||||
private final Clock clock = TestClock.pinned(Instant.ofEpochSecond(42));
|
||||
private ResourceBundleFactory resourceBundleFactory;
|
||||
private ResourceBundle resourceBundle;
|
||||
|
||||
@BeforeEach
|
||||
private void beforeEach() {
|
||||
clock = mock(Clock.class);
|
||||
resourceBundleFactory = mock(ResourceBundleFactory.class, (invocation) -> {
|
||||
throw new UnsupportedOperationException();
|
||||
});
|
||||
|
||||
when(clock.instant()).thenReturn(Instant.ofEpochSecond(42));
|
||||
}
|
||||
|
||||
private static String idFor(int i) {
|
||||
|
||||
Reference in New Issue
Block a user