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.
Showing
2 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
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
40 changes: 40 additions & 0 deletions
40
...ite-Interfaces/src/test/java/edu/wpi/cs/wpisuitetng/exceptions/TestWPISuiteException.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,40 @@ | ||
package edu.wpi.cs.wpisuitetng.exceptions; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
import static org.junit.Assert.assertNotNull; | ||
import static org.junit.Assert.assertNull; | ||
|
||
import javax.servlet.http.HttpServletResponse; | ||
|
||
import org.junit.Test; | ||
|
||
public class TestWPISuiteException { | ||
|
||
@Test | ||
public void testConstructor() { | ||
WPISuiteException exception = new WPISuiteException(); | ||
|
||
assertNotNull(exception); | ||
assertNull(exception.getMessage()); | ||
} | ||
|
||
@Test | ||
public void testConstructorWithMessage() { | ||
WPISuiteException exception = new WPISuiteException("TestException"); | ||
|
||
assertNotNull(exception); | ||
assertEquals("TestException", exception.getMessage()); | ||
} | ||
|
||
@Test | ||
public void testGetStatus(){ | ||
WPISuiteException exception = new WPISuiteException(); | ||
|
||
assertEquals(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, exception.getStatus()); | ||
} | ||
|
||
@Test | ||
public void testSerialVersionUID() { | ||
assertEquals(-5271354512939175980L, WPISuiteException.serialVersionUID); | ||
} | ||
} |