forked from nwlongnecker/wpi-suite
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
60465c5
commit 77d5660
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
Network/src/test/java/edu/wpi/cs/wpisuitetng/network/TestResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
|
||
} |