Fixed test

This commit is contained in:
Marcin Grzejszczak
2018-04-06 22:39:31 +02:00
parent 7f73677bc8
commit f070a88fc7

View File

@@ -69,12 +69,12 @@ public class SpanTagAnnotationHandlerTests {
if (annotation instanceof SpanTag) {
String resolvedValue = handler.resolveTagValue((SpanTag) annotation, "test");
assertThat(resolvedValue).isEqualTo("4 characters");
assertThat(resolvedValue).isEqualTo("hello characters");
} else {
fail("Annotation was not SleuthSpanTag");
}
}
@Test
public void shouldReturnArgumentToString() throws NoSuchMethodException, SecurityException {
Method method = AnnotationMockClass.class.getMethod("getAnnotationForArgumentToString", Long.class);
@@ -86,7 +86,7 @@ public class SpanTagAnnotationHandlerTests {
fail("Annotation was not SleuthSpanTag");
}
}
protected class AnnotationMockClass {
// tag::resolver_bean[]
@@ -97,7 +97,7 @@ public class SpanTagAnnotationHandlerTests {
// tag::spel[]
@NewSpan
public void getAnnotationForTagValueExpression(@SpanTag(key = "test", expression = "length() + ' characters'") String test) {
public void getAnnotationForTagValueExpression(@SpanTag(key = "test", expression = "'hello' + ' characters'") String test) {
}
// end::spel[]