Add a test

This commit is contained in:
James Agnew 2019-03-01 14:03:14 -05:00
parent 3972e17e62
commit 4138832071
2 changed files with 17 additions and 1 deletions

View File

@ -177,8 +177,9 @@ public abstract class BaseServerResponseException extends RuntimeException {
* to this exception (ie to the constructor) is considered trusted and is safe to
* return to the calling client.
*/
public void setErrorMessageTrusted(boolean theErrorMessageTrusted) {
public BaseServerResponseException setErrorMessageTrusted(boolean theErrorMessageTrusted) {
myErrorMessageTrusted = theErrorMessageTrusted;
return this;
}
/**

View File

@ -0,0 +1,15 @@
package ca.uhn.fhir.rest.server.exceptions;
import org.junit.Test;
import static org.junit.Assert.*;
public class BaseServerResponseExceptionTest {
@Test
public void testTrusted() {
assertTrue(new InternalErrorException("aaa").setErrorMessageTrusted(true).isErrorMessageTrusted());
}
}