HttpClientTests: Use assertEquals to assert about response code
The current usage of assertThat causes a warning in Eclipse: "The expression of type int is boxed into Integer". Replace it with assertEquals which does not cause this warning, and is consistent with how such assertions are done in other tests. Change-Id: Id3de3548353bf6be069b6ede89c605d094b6d3f4 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
This commit is contained in:
parent
40e9c38405
commit
3f8b9cb5fa
|
@ -367,7 +367,7 @@ public void testHttpClientWantsV2ButServerNotConfigured() throws Exception {
|
|||
c.setRequestMethod("GET");
|
||||
c.setRequestProperty("Git-Protocol", "version=2");
|
||||
c.connect();
|
||||
assertThat(c.getResponseCode(), is(200));
|
||||
assertEquals(200, c.getResponseCode());
|
||||
|
||||
PacketLineIn pckIn = new PacketLineIn(c.getInputStream());
|
||||
|
||||
|
@ -388,7 +388,7 @@ public void testV2HttpFirstResponse() throws Exception {
|
|||
c.setRequestMethod("GET");
|
||||
c.setRequestProperty("Git-Protocol", "version=2");
|
||||
c.connect();
|
||||
assertThat(c.getResponseCode(), is(200));
|
||||
assertEquals(200, c.getResponseCode());
|
||||
|
||||
PacketLineIn pckIn = new PacketLineIn(c.getInputStream());
|
||||
assertThat(pckIn.readString(), is("version 2"));
|
||||
|
@ -434,6 +434,6 @@ public void testV2HttpSubsequentResponse() throws Exception {
|
|||
assertTrue(s.matches("[0-9a-f]{40} [A-Za-z/]*"));
|
||||
}
|
||||
|
||||
assertThat(c.getResponseCode(), is(200));
|
||||
assertEquals(200, c.getResponseCode());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue