コード例 #1
0
 // ÄK 2
 @Test
 public void testReferrerEmpty() {
   response = requestConnector.GetContentFromAmazon("http://sqat.eu-gb.mybluemix.net", "", agent);
   assertTrue(
       response.containsKey(expectedProductName)
           && response.get(expectedProductName).equals(expectedProductPrice));
 }
コード例 #2
0
 // ÄK 1
 @Test(expected = IllegalArgumentException.class)
 public void testReferrerNull() {
   response =
       requestConnector.GetContentFromAmazon("http://sqat.eu-gb.mybluemix.net", null, agent);
 }
コード例 #3
0
 // ÄK 4
 @Test
 public void testStringValidURL() {
   response = requestConnector.GetContentFromAmazon("http://google.de", "Test", agent);
   HashMap<String, String> expected = new HashMap<String, String>();
   assertEquals(expected, response);
 }
コード例 #4
0
 // ÄK 3
 @Test(expected = IllegalArgumentException.class)
 public void testStringNotValidURL() {
   response = requestConnector.GetContentFromAmazon("Zeichenkette, keine URL", "Test", agent);
 }
コード例 #5
0
 // ÄK 2
 @Test(expected = IllegalArgumentException.class)
 public void testStringEmpty() {
   response = requestConnector.GetContentFromAmazon("", "Test", agent);
 }
コード例 #6
0
  // build testserver response
  public HashMap<String, String> buildTestserverResponse(GenericAgent agent) {

    return requestConnector.GetContentFromAmazon("http://sqat.eu-gb.mybluemix.net", "Test", agent);
  }