use of com.newrelic.agent.introspec.Introspector in project newrelic-java-agent by newrelic.
the class SprayHttpRoutesTest method testAlternateMapRoute.
@Test
public void testAlternateMapRoute() {
given().baseUri("http://localhost:" + server.getPort()).when().get("/map/blue").then().body(containsString("Map: 3"));
Introspector introspector = InstrumentationTestRunner.getIntrospector();
Assert.assertEquals(1, introspector.getFinishedTransactionCount(DEFAULT_TIMEOUT_MILLIS));
Assert.assertTrue(introspector.getTransactionNames().toString(), introspector.getTransactionNames().contains(getTransactionPrefix() + "/map/blue"));
}
use of com.newrelic.agent.introspec.Introspector in project newrelic-java-agent by newrelic.
the class SprayHttpRoutesTest method testIntNumberRoute.
@Test
public void testIntNumberRoute() {
given().baseUri("http://localhost:" + server.getPort()).when().get("/int/10").then().body(containsString("IntNumber: 10"));
Introspector introspector = InstrumentationTestRunner.getIntrospector();
Assert.assertEquals(1, introspector.getFinishedTransactionCount(DEFAULT_TIMEOUT_MILLIS));
Assert.assertTrue(introspector.getTransactionNames().toString(), introspector.getTransactionNames().contains(getTransactionPrefix() + "/int/IntNumber"));
}
use of com.newrelic.agent.introspec.Introspector in project newrelic-java-agent by newrelic.
the class SprayHttpRoutesTest method testUnmatchedSegmentRoute.
@Test
public void testUnmatchedSegmentRoute() {
given().baseUri("http://localhost:" + server.getPort()).when().get("/segment").then().body(containsString("The requested resource could not be found."));
Introspector introspector = InstrumentationTestRunner.getIntrospector();
Assert.assertEquals(1, introspector.getFinishedTransactionCount(DEFAULT_TIMEOUT_MILLIS));
Assert.assertTrue(introspector.getTransactionNames().toString(), introspector.getTransactionNames().contains(getTransactionPrefix() + "/Unknown Route"));
}
use of com.newrelic.agent.introspec.Introspector in project newrelic-java-agent by newrelic.
the class SprayHttpRoutesTest method testAlternateUnmatchedSegmentFutureRoute.
@Test
public void testAlternateUnmatchedSegmentFutureRoute() {
given().baseUri("http://localhost:" + server.getPort()).when().get("/segment/future/foo").then().body(containsString("The requested resource could not be found."));
Introspector introspector = InstrumentationTestRunner.getIntrospector();
Assert.assertEquals(1, introspector.getFinishedTransactionCount(DEFAULT_TIMEOUT_MILLIS));
Assert.assertTrue(introspector.getTransactionNames().toString(), introspector.getTransactionNames().contains(getTransactionPrefix() + "/Unknown Route"));
}
use of com.newrelic.agent.introspec.Introspector in project newrelic-java-agent by newrelic.
the class SprayHttpRoutesTest method testUnmatchedNegationFutureRoute.
@Test
public void testUnmatchedNegationFutureRoute() {
given().baseUri("http://localhost:" + server.getPort()).when().get("/futurematchnomatch").then().body(containsString("The requested resource could not be found."));
Introspector introspector = InstrumentationTestRunner.getIntrospector();
Assert.assertEquals(1, introspector.getFinishedTransactionCount(DEFAULT_TIMEOUT_MILLIS));
Assert.assertTrue(introspector.getTransactionNames().toString(), introspector.getTransactionNames().contains(getTransactionPrefix() + "/Unknown Route"));
}
Aggregations