use of com.netflix.zuul.monitoring.CounterFactory in project spring-cloud-netflix by spring-cloud.
the class DefaultCounterFactoryTests method shouldIncrement.
@Test
public void shouldIncrement() throws Exception {
MeterRegistry meterRegistry = mock(MeterRegistry.class);
CounterFactory factory = new DefaultCounterFactory(meterRegistry);
Counter counter = mock(Counter.class);
when(meterRegistry.counter(NAME)).thenReturn(counter);
factory.increment(NAME);
verify(counter).increment();
}
use of com.netflix.zuul.monitoring.CounterFactory in project spring-cloud-netflix by spring-cloud.
the class ZuulEmptyMetricsApplicationTests method shouldSetupDefaultCounterFactoryIfCounterServiceIsPresent.
@Test
public void shouldSetupDefaultCounterFactoryIfCounterServiceIsPresent() throws Exception {
CounterFactory factory = this.context.getBean(CounterFactory.class);
assertEquals(EmptyCounterFactory.class, factory.getClass());
}
Aggregations