Examples of DummyService


Examples of com.google.sitebricks.stat.testservices.DummyService

    });
  }

  @Test
  public final void testPublishingStatsInDummyService() {
    DummyService service = injector.getInstance(DummyService.class);

    service.call();
    service.call();
    service.call();

    Stats stats = injector.getInstance(Stats.class);
    ImmutableMap<StatDescriptor, Object> snapshot = stats.snapshot();

    assertEquals(snapshot.size(), 2);

    // Here we check the value of the field, NUMBER_OF_CALLS
    StatDescriptor numberOfCallsDescriptor =
        getByName(DummyService.NUMBER_OF_CALLS, snapshot);
    String numberOfCallsValue = (String) snapshot.get(numberOfCallsDescriptor);
    assertEquals(String.valueOf(service.getCalls()), numberOfCallsValue);

    // Here we check the value of the method, CALL_LATENCY_NS
    StatDescriptor callLatencyNsDescriptor =
        getByName(DummyService.CALL_LATENCY_NS, snapshot);
    String callLatencyValue = (String) snapshot.get(callLatencyNsDescriptor);
    assertEquals(service.getCallLatencyMs().toString(), callLatencyValue);
  }
View Full Code Here

Examples of com.google.sitebricks.stat.testservices.DummyService

        numberOfStaticCallsValue);
  }

  @Test
  public final void testPublishingDuplicatedStat() {
    DummyService service1 = injector.getInstance(DummyService.class);
    DummyService service2 = injector.getInstance(DummyService.class);

    service1.call();
    service2.call();

    Stats stats = injector.getInstance(Stats.class);
    ImmutableMap<StatDescriptor, Object> snapshot = stats.snapshot();

    assertEquals(2, snapshot.size(), snapshot.toString());
View Full Code Here

Examples of com.google.sitebricks.stat.testservices.DummyService

    });
  }

  @Test
  public final void testPublishingStatsInDummyService() {
    DummyService service = injector.getInstance(DummyService.class);

    service.call();
    service.call();
    service.call();

    Stats stats = injector.getInstance(Stats.class);
    ImmutableMap<StatDescriptor, Object> snapshot = stats.snapshot();

    assertEquals(snapshot.size(), 2);
View Full Code Here

Examples of com.google.sitebricks.stat.testservices.DummyService

        numberOfStaticCallsValue);
  }

  @Test
  public final void testPublishingDuplicatedStat() {
    DummyService service1 = injector.getInstance(DummyService.class);
    DummyService service2 = injector.getInstance(DummyService.class);

    service1.call();
    service2.call();

    Stats stats = injector.getInstance(Stats.class);
    ImmutableMap<StatDescriptor, Object> snapshot = stats.snapshot();

    assertEquals(2, snapshot.size(), snapshot.toString());
View Full Code Here

Examples of org.locationtech.udig.catalog.tests.DummyService

public class ResolveFactoryTest {

    @Test
    public void testResolve() throws Exception {
        DummyService service=new DummyService();
        assertTrue(service.canResolve(ResolvedTo.class));
        assertNotNull(service.resolve(ResolvedTo.class, new NullProgressMonitor()));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.