Search in sources :

Example 1 with SendDataRequest

use of webpiecesxxxxxpackage.service.SendDataRequest in project webpieces by deanhiller.

the class TestLesson1Json method validate.

private void validate(SearchResponse resp) {
    // next if you want, move assert logic into a validate method to re-use amongst tests
    Assert.assertEquals("match1", resp.getMatches().get(0));
    // check metrics are wired correctly here as well
    RequiredSearch result = metrics.get("testCounter");
    Counter counter = result.counter();
    Assert.assertEquals(2.0, counter.count(), 0.1);
    // check the mock system was called with 6
    List<SendDataRequest> params = mockRemoteService.getSendMethodParameters();
    Assert.assertEquals(2, params.size());
    Assert.assertEquals(6, params.get(0).getNum());
}
Also used : Counter(io.micrometer.core.instrument.Counter) SendDataRequest(webpiecesxxxxxpackage.service.SendDataRequest) RequiredSearch(io.micrometer.core.instrument.search.RequiredSearch)

Aggregations

Counter (io.micrometer.core.instrument.Counter)1 RequiredSearch (io.micrometer.core.instrument.search.RequiredSearch)1 SendDataRequest (webpiecesxxxxxpackage.service.SendDataRequest)1