Package org.anotheria.moskitoexamples.spring2

Examples of org.anotheria.moskitoexamples.spring2.MonitoredTest


public class UnmonitoredTest {
  @Test
  public void testUnmonitoredCall(){
    ApplicationContext context = new ClassPathXmlApplicationContext(
        new String[] {"services.xml"});
    AService service = (AService)context.getBean("AService");
    assertEquals(2*100, service.echoMethodA(100));
  }
View Full Code Here


  public void testMonitoredCall(){
    BasicConfigurator.configure();
    System.setProperty("JUNITTEST", "" + Boolean.TRUE);
    ApplicationContext context = new ClassPathXmlApplicationContext(
        new String[] {"services-aop.xml"});
    AService service = (AService)context.getBean("AService");
    assertEquals(2*100, service.echoMethodA(100));

    //check that the call is traced
    IProducerRegistryAPI registryAPI = new ProducerRegistryAPIFactory().createProducerRegistryAPI();
    IStatsProducer<ServiceStats> producerB = registryAPI.getProducer("BServiceImpl");
    assertEquals(1, producerB.getStats().get(0).getTotalRequests());
View Full Code Here

TOP

Related Classes of org.anotheria.moskitoexamples.spring2.MonitoredTest

Copyright © 2018 www.massapicom. 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.