Add a test
This commit is contained in:
parent
3972e17e62
commit
4138832071
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue