Add test for setVsAsUrl parameter setting (#1345)

This commit is contained in:
dotasek 2023-07-12 16:16:09 -04:00 committed by GitHub
parent eef3ebc5f1
commit 6598c1d28e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -95,6 +95,15 @@ public class BaseWorkerContextTests {
assertEquals("lenient-display-validation", pin.getParameter("mode").getValue().primitiveValue());
}
@Test
public void testAddServerValidationParametersVsAsUrl() throws IOException {
BaseWorkerContext baseWorkerContext = getBaseWorkerContext();
Parameters pin = new Parameters();
baseWorkerContext.addServerValidationParameters(new ValueSet().setUrl("http://dummy.org/vs"), pin, new ValidationOptions().setVsAsUrl(true));
assertEquals("uri", pin.getParameter("url").getValue().fhirType());
assertEquals("http://dummy.org/vs", pin.getParameter("url").getValue().primitiveValue());
}
@Test
public void testAddServerValidationParametersDisplayError() throws IOException {
BaseWorkerContext baseWorkerContext = getBaseWorkerContext();