Skip to content

Commit 5b886bf

Browse files
committed
Add ConflictResponse
1 parent cef0fda commit 5b886bf

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package httpserver.response;
2+
3+
public class ConflictResponse extends Response {
4+
@Override
5+
public int getStatusCode() {
6+
return 409;
7+
}
8+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package httpserver.response;
2+
3+
import org.junit.Test;
4+
5+
import static org.junit.Assert.*;
6+
7+
public class ConflictResponseTest {
8+
@Test
9+
public void has409StatusCode() throws Exception {
10+
ConflictResponse conflictResponse = new ConflictResponse();
11+
12+
assertEquals(409, conflictResponse.getStatusCode());
13+
}
14+
}

0 commit comments

Comments
 (0)