Bläddra i källkod

Merge pull request #139 from csmith/master

Update dependencies.
pull/140/head
Greg Holmes 7 år sedan
förälder
incheckning
2be196da00

+ 3
- 3
build.gradle Visa fil

@@ -96,19 +96,19 @@ subprojects {
96 96
     dependencies {
97 97
         compile group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.1'
98 98
         compile group: 'com.squareup.dagger', name: 'dagger-compiler', version: '1.2.5'
99
-        compile group: 'com.google.auto.value', name: 'auto-value', version: '1.2'
99
+        compile group: 'com.google.auto.value', name: 'auto-value', version: '1.3'
100 100
 
101 101
         compile group: 'org.slf4j', name: 'slf4j-api', version:'1.7.21'
102 102
         compile group: 'com.squareup.dagger', name: 'dagger', version: '1.2.5'
103 103
         compile group: 'com.google.guava', name:'guava', version: '19.0'
104 104
 
105
-        compile group: 'net.engio', name: 'mbassador', version: '1.2.4.2'
105
+        compile group: 'net.engio', name: 'mbassador', version: '1.3.0'
106 106
         compile group: 'de.odysseus.juel', name: 'juel-api', version: '2.2.7'
107 107
         compile group: 'de.odysseus.juel', name: 'juel-impl', version: '2.2.7'
108 108
         compile group: 'de.odysseus.juel', name: 'juel-spi', version: '2.2.7'
109 109
 
110 110
         testCompile group: 'junit', name: 'junit', version: '4.12'
111
-        testCompile group: 'org.mockito', name: 'mockito-core', version: '1.10.19'
111
+        testCompile group: 'org.mockito', name: 'mockito-core', version: '2.2.7'
112 112
     }
113 113
 
114 114
     task publishSnapshot(dependsOn: 'publishMavenJavaPublicationToSnapshotsRepository') << {

+ 10
- 18
irc/src/test/java/com/dmdirc/parser/irc/IRCReaderTest.java Visa fil

@@ -71,8 +71,8 @@ public class IRCReaderTest {
71 71
         final InputStream stream = new ByteArrayInputStream("te t :foo\r\n".getBytes());
72 72
         final Encoder encoder = mock(Encoder.class);
73 73
 
74
-        when(encoder.encode((String) isNull(), (String) isNull(),
75
-                (byte[]) anyObject(), anyInt(), eq(3)))
74
+        when(encoder.encode(isNull(), isNull(),
75
+                anyObject(), anyInt(), eq(3)))
76 76
                 .thenReturn("encoded");
77 77
 
78 78
         final IRCReader reader = new IRCReader(stream, encoder);
@@ -88,9 +88,7 @@ public class IRCReaderTest {
88 88
         final InputStream stream = new ByteArrayInputStream("foo bar  baz  :qux  baz\r\n".getBytes());
89 89
         final Encoder encoder = mock(Encoder.class);
90 90
 
91
-        when(encoder.encode((String) isNull(), (String) isNull(),
92
-                (byte[]) anyObject(), eq(15), eq(8)))
93
-                .thenReturn("qux  baz");
91
+        when(encoder.encode(isNull(), isNull(), any(), eq(15), eq(8))).thenReturn("qux  baz");
94 92
 
95 93
         final IRCReader reader = new IRCReader(stream, encoder);
96 94
         final ReadLine line = reader.readLine();
@@ -106,8 +104,7 @@ public class IRCReaderTest {
106 104
 
107 105
         new IRCReader(stream, encoder).readLine();
108 106
 
109
-        verify(encoder).encode(eq("src"), anyString(),
110
-                (byte[]) anyObject(), anyInt(), anyInt());
107
+        verify(encoder).encode(eq("src"), isNull(), any(), anyInt(), anyInt());
111 108
     }
112 109
 
113 110
     /** Verifies that no source is passed if the source is empty. */
@@ -118,8 +115,7 @@ public class IRCReaderTest {
118 115
 
119 116
         new IRCReader(stream, encoder).readLine();
120 117
 
121
-        verify(encoder).encode((String) isNull(), anyString(),
122
-                (byte[]) anyObject(), anyInt(), anyInt());
118
+        verify(encoder).encode(isNull(), isNull(), any(), anyInt(), anyInt());
123 119
     }
124 120
 
125 121
     /** Verifies that a destination is extracted properly. */
@@ -130,8 +126,7 @@ public class IRCReaderTest {
130 126
 
131 127
         new IRCReader(stream, encoder).readLine();
132 128
 
133
-        verify(encoder).encode(anyString(), eq("y"), (byte[]) anyObject(),
134
-                anyInt(), anyInt());
129
+        verify(encoder).encode(anyString(), eq("y"), any(), anyInt(), anyInt());
135 130
     }
136 131
 
137 132
     /** Verifies that no destination is extracted if there's no source. */
@@ -142,8 +137,7 @@ public class IRCReaderTest {
142 137
 
143 138
         new IRCReader(stream, encoder).readLine();
144 139
 
145
-        verify(encoder).encode(anyString(), (String) isNull(),
146
-                (byte[]) anyObject(), anyInt(), anyInt());
140
+        verify(encoder).encode(isNull(), isNull(), any(), anyInt(), anyInt());
147 141
     }
148 142
 
149 143
     /** Verifies that no destination is extracted if there are too few args. */
@@ -154,8 +148,7 @@ public class IRCReaderTest {
154 148
 
155 149
         new IRCReader(stream, encoder).readLine();
156 150
 
157
-        verify(encoder).encode(anyString(), (String) isNull(),
158
-                (byte[]) anyObject(), anyInt(), anyInt());
151
+        verify(encoder).encode(anyString(), isNull(), any(), anyInt(), anyInt());
159 152
     }
160 153
 
161 154
     /** Verifies that a numeric's destination is extracted properly. */
@@ -166,7 +159,7 @@ public class IRCReaderTest {
166 159
 
167 160
         new IRCReader(stream, encoder).readLine();
168 161
 
169
-        verify(encoder).encode(anyString(), eq("y"), (byte[]) anyObject(), anyInt(), anyInt());
162
+        verify(encoder).encode(anyString(), eq("y"), any(), anyInt(), anyInt());
170 163
     }
171 164
 
172 165
     /** Verifies that the close call is proxied to the stream. */
@@ -190,8 +183,7 @@ public class IRCReaderTest {
190 183
                 (int) '1', (int) ' ', 0xF6, (int) ' ', (int) 'y', (int) ' ', (int) 'z', (int) ' ',
191 184
                 (int) ':', (int) 'x', (int) '\r', (int) '\n');
192 185
 
193
-        when(encoder.encode(anyString(), anyString(),
194
-                (byte[]) any(), anyInt(), anyInt())).thenReturn("x");
186
+        when(encoder.encode(anyString(), anyString(), any(), anyInt(), anyInt())).thenReturn("x");
195 187
 
196 188
         final ReadLine line = new IRCReader(stream, encoder, Charset.forName("UTF-8")).readLine();
197 189
 

+ 1
- 1
irc/src/test/java/com/dmdirc/parser/irc/processors/Process001Test.java Visa fil

@@ -129,7 +129,7 @@ public class Process001Test {
129 129
         when(localClient.getNickname()).thenAnswer(invocation -> nickname.toString());
130 130
         doAnswer(invocation -> {
131 131
             nickname.setLength(0);
132
-            nickname.append(invocation.getArgumentAt(0, String.class));
132
+            nickname.append(invocation.<String>getArgument(0));
133 133
             return null;
134 134
         }).when(localClient).setUserBits(anyString(), eq(true), anyBoolean());
135 135
     }

Laddar…
Avbryt
Spara