use of com.nedap.archie.rm.datavalues.DvState in project openEHR_SDK by ehrbase.
the class DvStateValidatorTest method testValidate.
@Test
void testValidate() throws Exception {
var node = parseNode("/webtemplate_nodes/dv_state.json");
var dvState = new DvState();
dvState.setValue(new DvCodedText("Test", new CodePhrase(new TerminologyId("local"), "at0010")));
var result = validator.validate(dvState, node);
assertTrue(result.isEmpty());
}
use of com.nedap.archie.rm.datavalues.DvState in project openEHR_SDK by ehrbase.
the class DvStateValidatorTest method testValidate_List.
@Test
void testValidate_List() throws Exception {
var node = parseNode("/webtemplate_nodes/dv_state_codedtext.json");
var dvState = new DvState();
dvState.setValue(new DvCodedText("First", new CodePhrase(new TerminologyId("local"), "at0028")));
var result = validator.validate(dvState, node);
assertTrue(result.isEmpty());
dvState.setValue(new DvCodedText("Test", new CodePhrase(new TerminologyId("local"), "at0010")));
result = validator.validate(dvState, node);
assertEquals(1, result.size());
}
Aggregations