コード例 #1
0
ファイル: ValueRetrieverTest.java プロジェクト: jswesky/ASRCM
 /**
  * Constructs a {@link VariableEntry} with retrieved values from the given patient and asserts
  * that it contains the expected dynamic values.
  */
 private void verifyRetrievedValue(
     final Collection<? extends Variable> vars,
     final Patient patient,
     final Map<String, String> expectedValues) {
   final VariableEntry actualVariableEntry = VariableEntry.withRetrievedValues(vars, patient);
   assertEquals(expectedValues, actualVariableEntry.getDynamicValues());
 }
コード例 #2
0
ファイル: ValueRetrieverTest.java プロジェクト: jswesky/ASRCM
  @Test
  public final void testWithRetrievedLabs() {
    final List<AbstractVariable> vars = new ArrayList<AbstractVariable>();
    final Patient patient = SampleCalculations.dummyPatientWithLabs(1);

    // Note that vars is empty at this point.
    final VariableEntry expected = new VariableEntry(vars);

    addAllLabs(expected, vars, patient);
    final VariableEntry entry = VariableEntry.withRetrievedValues(vars, patient);
    assertEquals(expected.getDynamicValues(), entry.getDynamicValues());
  }