Skip to content

Commit 2092ca9

Browse files
geetikabatrarawagner
authored andcommitted
Fixed core tests
1 parent ea17c2a commit 2092ca9

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

tests/com.redhat.fabric8analytics.lsp.eclipse.core.tests/src/com/redhat/fabric8analytics/lsp/eclipse/core/tests/RecommenderAPIProviderTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public void setup() throws CoreException, IOException {
9898
File fileB = createFile(project, "secondfile", "bbb content");
9999
files.put(fileA.getAbsolutePath(), new String(Files.readAllBytes(fileA.toPath())));
100100
files.put(fileB.getAbsolutePath(), new String(Files.readAllBytes(fileB.toPath())));
101-
}
101+
}
102102

103103
@After
104104
public void after() throws CoreException {
@@ -137,12 +137,12 @@ public void checkNullToken() {
137137

138138
@Test(expected=IllegalArgumentException.class)
139139
public void requestAnalyses_nullFiles() throws ClientProtocolException, IOException, RecommenderAPIException, CoreException {
140-
provider.requestAnalyses(null);
140+
provider.requestAnalyses(null, null);
141141
}
142142

143143
@Test(expected=IllegalArgumentException.class)
144144
public void requestAnalyses_emptyFiles() throws ClientProtocolException, IOException, RecommenderAPIException, CoreException {
145-
provider.requestAnalyses(Collections.emptyMap());
145+
provider.requestAnalyses(Collections.emptyMap(), null);
146146
}
147147

148148
@Test
@@ -155,7 +155,7 @@ public void requestAnalyses_createPost() throws ClientProtocolException, IOExcep
155155

156156
final ArgumentCaptor<HttpPost> argumentCaptor = ArgumentCaptor.forClass(HttpPost.class);
157157

158-
provider.requestAnalyses(files);
158+
provider.requestAnalyses(files, null);
159159

160160
verify(httpClient).execute(argumentCaptor.capture());
161161
HttpPost httpPost = argumentCaptor.getValue();
@@ -178,7 +178,7 @@ public void requestAnalyses_responseOK() throws ClientProtocolException, IOExcep
178178
when(httpEntity.getContent()).thenReturn(new ByteArrayInputStream(JSON.getBytes()));
179179
when(statusLine.getStatusCode()).thenReturn(HttpStatus.SC_OK);
180180

181-
String jobID = provider.requestAnalyses(files);
181+
String jobID = provider.requestAnalyses(files, null);
182182
verify(httpClient, atLeastOnce()).close();
183183

184184
assertThat(jobID, is("12345"));
@@ -190,15 +190,15 @@ public void requestAnalyses_responseOther() throws ClientProtocolException, IOEx
190190
when(httpResponse.getStatusLine()).thenReturn(statusLine);
191191
when(statusLine.getStatusCode()).thenReturn(HttpStatus.SC_FORBIDDEN);
192192

193-
provider.requestAnalyses(files);
193+
provider.requestAnalyses(files, null);
194194
verify(httpClient, atLeastOnce()).close();
195195
}
196196

197197
@Test(expected=RecommenderAPIException.class)
198198
public void requestAnalyses_clientException() throws ClientProtocolException, IOException, RecommenderAPIException {
199199
when(httpClient.execute(any(HttpPost.class))).thenThrow(IOException.class);
200200

201-
provider.requestAnalyses(files);
201+
provider.requestAnalyses(files, null);
202202
verify(httpClient, atLeastOnce()).close();
203203
}
204204

0 commit comments

Comments
 (0)