ADD:: Test for ApplicationException.
This commit is contained in:
22
src/Common/src/test/java/ApplicationExceptionTest.java
Normal file
22
src/Common/src/test/java/ApplicationExceptionTest.java
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
import greenify.common.ApplicationException;
|
||||||
|
import greenify.common.ErrorResponse;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
|
public class ApplicationExceptionTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void setAndGetTest() {
|
||||||
|
ApplicationException ex = new ApplicationException("This is an exception");
|
||||||
|
assertEquals(ex.getMessage(), "This is an exception");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void equalsTest() {
|
||||||
|
ApplicationException ex = new ApplicationException("This is an exception");
|
||||||
|
ApplicationException test = new ApplicationException("This is an exception");
|
||||||
|
assertEquals(ex.getMessage(), test.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user