Skip to content

Commit

Permalink
Add TestResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsmieja committed Aug 24, 2014
1 parent 60465c5 commit 77d5660
Showing 1 changed file with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package edu.wpi.cs.wpisuitetng.network;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.junit.Test;

public class TestResponse {

@Test
public void testConstructor(){
int responseCode = 200;
String responseMessage = "Test Response";
Map<String, List<String>> headers = new HashMap<String, List<String>>();
String responseBody = "Test Response Body";

Response response = new Response(responseCode, responseMessage, headers, responseBody);

assertNotNull(response);
assertEquals(response.getBody(), responseBody);
assertEquals(response.getStatusCode(), responseCode);
assertEquals(response.getHeaders(), headers);
assertEquals(response.getStatusMessage(), responseMessage);
}

}

0 comments on commit 77d5660

Please sign in to comment.