コード例 #1
0
  @Test
  public void testUpdateIndicator() throws Exception {
    IndicatorType type = new IndicatorType("IndicatorType", 100, false);

    indicatorTypeStore.save(type);

    Indicator indicatorA = createIndicator('A', type);
    int idA = indicatorStore.save(indicatorA);
    indicatorA = indicatorStore.get(idA);
    assertEq('A', indicatorA);

    indicatorA.setName("IndicatorB");
    indicatorStore.update(indicatorA);
    indicatorA = indicatorStore.get(idA);
    assertNotNull(indicatorA);
    assertEquals(indicatorA.getName(), "IndicatorB");
  }
コード例 #2
0
 private void assertEq(char uniqueCharacter, Indicator indicator) {
   assertEquals("Indicator" + uniqueCharacter, indicator.getName());
   assertEquals("IndicatorShort" + uniqueCharacter, indicator.getShortName());
   assertEquals("IndicatorCode" + uniqueCharacter, indicator.getCode());
   assertEquals("IndicatorDescription" + uniqueCharacter, indicator.getDescription());
 }