Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored annotation-visibility testing.
- Loading branch information
Rafael Winterhalter
committed
Dec 21, 2015
1 parent
5d33f55
commit 44b8b2f
Showing
6 changed files
with
42 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...ep/src/test/java/net/bytebuddy/implementation/bind/annotation/AbstractAnnotationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package net.bytebuddy.implementation.bind.annotation; | ||
|
||
import org.junit.Test; | ||
|
||
import java.lang.annotation.Annotation; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
|
||
import static org.hamcrest.CoreMatchers.is; | ||
import static org.hamcrest.MatcherAssert.assertThat; | ||
|
||
public abstract class AbstractAnnotationTest<T extends Annotation> { | ||
|
||
protected final Class<T> annotationType; | ||
|
||
protected AbstractAnnotationTest(Class<T> annotationType) { | ||
this.annotationType = annotationType; | ||
} | ||
|
||
@Test | ||
public void testAnnotationVisibility() throws Exception { | ||
assertThat(annotationType.isAnnotationPresent(Retention.class), is(true)); | ||
assertThat(annotationType.getAnnotation(Retention.class).value(), is(RetentionPolicy.RUNTIME)); | ||
} | ||
} |
51 changes: 0 additions & 51 deletions
51
.../src/test/java/net/bytebuddy/implementation/bind/annotation/AnnotationVisibilityTest.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters