Package org.apache.sirona.javaagent

Examples of org.apache.sirona.javaagent.AgentContext.stop()


    @Test
    public void start() {
        final String key = "start";
        final AgentContext context = AgentContext.startOn(null, key);
        context.stop(null);
        assertEquals("org.apache.sirona.javaagent.AgentContext", context.getClass().getName());
        assertEquals(1, Repository.INSTANCE.getCounter(AgentContext.key(key)).getHits());
    }

    @Test
View Full Code Here


    @Test
    public void attributes() {
        final String key = "ref";
        final Object instance = new Object();
        final AgentContext context = AgentContext.startOn(instance, key);
        context.stop(null);
        assertEquals(instance, context.getReference());
        assertEquals(key, context.getKey());
        assertEquals(1, Repository.INSTANCE.getCounter(AgentContext.key(key)).getHits());
    }
}
View Full Code Here

    @Test
    public void start() {
        final Counter.Key key = AgentContext.key("start");
        final AgentContext context = AgentContext.startOn(key, null);
        context.stop();
        assertEquals("org.apache.sirona.javaagent.AgentContext", context.getClass().getName());
        assertEquals(1, Repository.INSTANCE.getCounter(key).getHits());
    }

    @Test
View Full Code Here

    @Test
    public void attributes() {
        final Counter.Key key = AgentContext.key("ref");
        final Object instance = new Object();
        final AgentContext context = AgentContext.startOn(key, instance);
        context.stop();
        assertEquals(instance, context.getReference());
        assertEquals(key, context.getKey());
        assertEquals(1, Repository.INSTANCE.getCounter(key).getHits());
    }
}
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.