Add test to reproduce SPR-15271

This commit is contained in:
Stephane Nicoll 2017-02-20 11:34:08 +01:00
parent 1efcf26559
commit 598d9a4b05
1 changed files with 23 additions and 1 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -204,6 +204,15 @@ public class AnnotatedElementUtilsTests {
attributes.get("value"));
}
@Test
@Ignore("To be validated by ")
public void getAllMergedAnnotationsOnClassWithInterface() throws NoSuchMethodException {
Method m = TransactionalServiceImpl.class.getMethod("doIt");
Set<Transactional> allMergedAnnotations =
getAllMergedAnnotations(m, Transactional.class);
assertEquals(1, allMergedAnnotations.size());
}
@Test
public void getMergedAnnotationAttributesOnClassWithLocalAnnotation() {
Class<?> element = TxConfig.class;
@ -1272,4 +1281,17 @@ public class AnnotatedElementUtilsTests {
static class ResourceHolder {
}
interface TransactionalService {
@Transactional
void doIt();
}
class TransactionalServiceImpl implements TransactionalService {
@Override
public void doIt() {
}
}
}