@Test public void add_long_measure() throws Exception { underTest.addMeasure(OUTPUT_METRIC, 10L); assertThat(underTest.getMeasure(OUTPUT_METRIC).getLongValue()).isEqualTo(10L); }
@Test public void add_string_measure() throws Exception { underTest.addMeasure(OUTPUT_METRIC, "text"); assertThat(underTest.getMeasure(OUTPUT_METRIC).getStringValue()).isEqualTo("text"); }
@Test public void get_int_measure() throws Exception { underTest.addInputMeasure(INPUT_METRIC, 10); assertThat(underTest.getMeasure(INPUT_METRIC).getIntValue()).isEqualTo(10); }
@Test public void get_string_measure() throws Exception { underTest.addInputMeasure(INPUT_METRIC, "text"); assertThat(underTest.getMeasure(INPUT_METRIC).getStringValue()).isEqualTo("text"); }
@Test public void get_long_measure() throws Exception { underTest.addInputMeasure(INPUT_METRIC, 10L); assertThat(underTest.getMeasure(INPUT_METRIC).getLongValue()).isEqualTo(10L); }
@Test public void get_boolean_measure() throws Exception { underTest.addInputMeasure(INPUT_METRIC, true); assertThat(underTest.getMeasure(INPUT_METRIC).getBooleanValue()).isTrue(); }
@Test public void add_int_measure() throws Exception { underTest.addMeasure(OUTPUT_METRIC, 10); assertThat(underTest.getMeasure(OUTPUT_METRIC).getIntValue()).isEqualTo(10); }
@Test public void get_double_measure() throws Exception { underTest.addInputMeasure(INPUT_METRIC, 10d); assertThat(underTest.getMeasure(INPUT_METRIC).getDoubleValue()).isEqualTo(10d); }
@Test public void add_double_measure() throws Exception { underTest.addMeasure(OUTPUT_METRIC, 10d); assertThat(underTest.getMeasure(OUTPUT_METRIC).getDoubleValue()).isEqualTo(10d); }
@Test public void fail_with_IAE_when_trying_to_get_measure_on_unknown_metric() throws Exception { thrown.expect(IllegalArgumentException.class); thrown.expectMessage("Only metrics in [INPUT_METRIC] can be used to load measures"); underTest.getMeasure("unknown"); }