ADD:: Test for ApplicationException.

This commit is contained in:
Merel Steenbergen
2019-04-15 14:16:18 +02:00
parent af65142bf4
commit a44907865c

View 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());
}
}