Пример #1
0
 @Test
 public void notFoundWithoutValidParams() throws IOException, TmcCoreException {
   HttpResult result =
       urlCommunicator.makeGetRequest(URI.create(serverAddress), "ihanvaaraheaderi:1234");
   assertEquals(403, result.getStatusCode());
 }
Пример #2
0
 @Test
 public void okWithValidParams() throws IOException, TmcCoreException {
   HttpResult result = urlCommunicator.makeGetRequest(URI.create(serverAddress), "test:1234");
   assertEquals(200, result.getStatusCode());
 }
Пример #3
0
 @Test
 public void badRequestWithoutValidUrl() throws IOException, TmcCoreException {
   HttpResult result =
       urlCommunicator.makeGetRequest(URI.create(serverAddress + "/vaaraurl"), "test:1234");
   assertEquals(400, result.getStatusCode());
 }
Пример #4
0
 @Test(expected = IOException.class)
 public void badGetRequestIsThrown() throws IOException, TmcCoreException {
   urlCommunicator.makeGetRequest(URI.create("asasdasd"), "chang:/\\\\eiparas");
 }