use of com.newrelic.agent.introspec.Introspector in project newrelic-java-agent by newrelic.
the class SprayHttpRoutesTest method testAlternativePipeOptionalFutureRoute.
@Test
public void testAlternativePipeOptionalFutureRoute() {
given().baseUri("http://localhost:" + server.getPort()).when().get("/futurepipe/optional/X71/edit").then().body(containsString("FuturePipe + Optional: 71"));
Introspector introspector = InstrumentationTestRunner.getIntrospector();
Assert.assertEquals(1, introspector.getFinishedTransactionCount(DEFAULT_TIMEOUT_MILLIS));
Assert.assertTrue(introspector.getTransactionNames().toString(), introspector.getTransactionNames().contains(getTransactionPrefix() + "/futurepipe/optional/X~IntNumber.?/edit"));
}
use of com.newrelic.agent.introspec.Introspector in project newrelic-java-agent by newrelic.
the class SprayHttpRoutesTest method testNonPathEndRoute.
@Test
public void testNonPathEndRoute() {
given().baseUri("http://localhost:" + server.getPort()).when().get("/pathend/extra").then().body(containsString("PathEnd: extra"));
Introspector introspector = InstrumentationTestRunner.getIntrospector();
Assert.assertEquals(1, introspector.getFinishedTransactionCount(DEFAULT_TIMEOUT_MILLIS));
Assert.assertTrue(introspector.getTransactionNames().toString(), introspector.getTransactionNames().contains(getTransactionPrefix() + "/pathend/Segment"));
}
use of com.newrelic.agent.introspec.Introspector in project newrelic-java-agent by newrelic.
the class SprayHttpRoutesTest method testHexIntNumberRoute.
@Test
public void testHexIntNumberRoute() {
given().baseUri("http://localhost:" + server.getPort()).when().get("/hexint/CAFE").then().body(containsString("HexIntNumber: 51966"));
Introspector introspector = InstrumentationTestRunner.getIntrospector();
Assert.assertEquals(1, introspector.getFinishedTransactionCount(DEFAULT_TIMEOUT_MILLIS));
Assert.assertTrue(introspector.getTransactionNames().toString(), introspector.getTransactionNames().contains(getTransactionPrefix() + "/hexint/HexIntNumber"));
}
use of com.newrelic.agent.introspec.Introspector in project newrelic-java-agent by newrelic.
the class SprayHttpRoutesTest method testHexLongNumberFutureRoute.
@Test
public void testHexLongNumberFutureRoute() {
given().baseUri("http://localhost:" + server.getPort()).when().get("/hexlongfuture/CAFE").then().body(containsString("HexLongNumberFuture: 51966"));
Introspector introspector = InstrumentationTestRunner.getIntrospector();
Assert.assertEquals(1, introspector.getFinishedTransactionCount(DEFAULT_TIMEOUT_MILLIS));
Assert.assertTrue(introspector.getTransactionNames().contains(getTransactionPrefix() + "/hexlongfuture/HexLongNumber"));
}
use of com.newrelic.agent.introspec.Introspector in project newrelic-java-agent by newrelic.
the class SprayHttpRoutesTest method testSecondaryAlternateUnmatchedSegmentFutureRoute.
@Test
public void testSecondaryAlternateUnmatchedSegmentFutureRoute() {
given().baseUri("http://localhost:" + server.getPort()).when().get("/segment/future/foobar/baz").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