Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Test
- public void newInstance_shouldCopyMostFields() throws Exception {
- Obs obs = new Obs();
- obs.setStatus(Obs.Status.PRELIMINARY);
- obs.setInterpretation(Obs.Interpretation.LOW);
- obs.setConcept(new Concept());
- obs.setValueNumeric(1.2);
- Obs copy = Obs.newInstance(obs);
- // these fields are not copied
- assertThat(copy.getObsId(), nullValue());
- assertThat(copy.getUuid(), not(obs.getUuid()));
- // other fields are copied
- assertThat(copy.getConcept(), is(obs.getConcept()));
- assertThat(copy.getValueNumeric(), is(obs.getValueNumeric()));
- assertThat(copy.getStatus(), is(obs.getStatus()));
- assertThat(copy.getInterpretation(), is(obs.getInterpretation()));
- // TODO test that the rest of the fields are set
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement