コード例 #1
0
 @Test
 public void countTwo() {
   this.data.set(new Metric<Integer>("foo", 1));
   this.data.set(new Metric<Integer>("bar", 1));
   this.exporter.export();
   assertThat(this.reader.count()).isEqualTo(2);
   RichGauge one = this.reader.findOne("foo");
   assertThat(one).isNotNull();
   assertThat(one.getCount()).isEqualTo(1);
 }
コード例 #2
0
 @Test
 public void countOne() {
   this.data.set(new Metric<Integer>("foo", 1));
   this.data.set(new Metric<Integer>("foo", 1));
   this.exporter.export();
   // Check the exporter worked
   assertThat(this.repository.count()).isEqualTo(6);
   assertThat(this.reader.count()).isEqualTo(1);
   RichGauge one = this.reader.findOne("foo");
   assertThat(one).isNotNull();
   assertThat(one.getCount()).isEqualTo(2);
 }