Browse Source

Fix tests after Mockito upgrade.

We were matching a float using anyInt(), which somehow used to
work...
pull/56/head
Chris Smith 7 years ago
parent
commit
e33c482f83
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/test/java/com/dmdirc/util/io/DownloaderTest.java

+ 2
- 2
src/test/java/com/dmdirc/util/io/DownloaderTest.java View File

@@ -46,6 +46,7 @@ import org.mockito.runners.MockitoJUnitRunner;
46 46
 import static org.junit.Assert.assertEquals;
47 47
 import static org.junit.Assert.assertFalse;
48 48
 import static org.junit.Assert.assertTrue;
49
+import static org.mockito.ArgumentMatchers.anyFloat;
49 50
 import static org.mockito.Matchers.anyBoolean;
50 51
 import static org.mockito.Matchers.anyInt;
51 52
 import static org.mockito.Mockito.atLeastOnce;
@@ -70,7 +71,6 @@ public class DownloaderTest {
70 71
                 "OMG IM A FAKE DOWNLOAD".getBytes("UTF-8"));
71 72
         when(mockedConnection.getInputStream()).thenReturn(is);
72 73
         when(mockedConnection.getOutputStream()).thenReturn(os);
73
-        when(mockedConnection.getLastModified()).thenReturn(10L, (Long)11L);
74 74
     }
75 75
 
76 76
     @Test
@@ -137,7 +137,7 @@ public class DownloaderTest {
137 137
         assertEquals(Lists.newArrayList("OMG IM A FAKE DOWNLOAD"), Files.readAllLines(file,
138 138
                 Charset.forName("UTF-8")));
139 139
         verify(listener).setIndeterminate(anyBoolean());
140
-        verify(listener, atLeastOnce()).downloadProgress(anyInt());
140
+        verify(listener, atLeastOnce()).downloadProgress(anyFloat());
141 141
     }
142 142
 
143 143
     private class TestableDownloader extends Downloader {

Loading…
Cancel
Save