Merge branch '5.1.x'

This commit is contained in:
Sam Brannen
2019-08-06 18:11:47 +02:00
2 changed files with 11 additions and 23 deletions

View File

@@ -72,13 +72,21 @@ public class AnnotationAttributesTests {
}
@Test
public void unresolvableClass() throws Exception {
public void unresolvableClassWithClassNotFoundException() throws Exception {
attributes.put("unresolvableClass", new ClassNotFoundException("myclass"));
assertThatIllegalArgumentException().isThrownBy(() ->
attributes.getClass("unresolvableClass"))
.withMessageContaining("myclass");
}
@Test
public void unresolvableClassWithLinkageError() throws Exception {
attributes.put("unresolvableClass", new LinkageError("myclass"));
exception.expect(IllegalArgumentException.class);
exception.expectMessage(containsString("myclass"));
attributes.getClass("unresolvableClass");
}
@Test
public void singleElementToSingleElementArrayConversionSupport() throws Exception {
Filter filter = FilteredClass.class.getAnnotation(Filter.class);