Fixed test
This commit is contained in:
@@ -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[]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user