File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed
modules/junit-jupiter/src
main/java/org/testcontainers/junit/jupiter
test/java/org/testcontainers/junit/jupiter Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change 1111 *
1212 * @see Testcontainers
1313 */
14- @ Target (ElementType .FIELD )
14+ @ Target ({ ElementType .FIELD , ElementType . ANNOTATION_TYPE } )
1515@ Retention (RetentionPolicy .RUNTIME )
1616public @interface Container {
1717}
Original file line number Diff line number Diff line change 1+ package org .testcontainers .junit .jupiter ;
2+
3+ import org .junit .jupiter .api .Test ;
4+ import org .testcontainers .containers .PostgreSQLContainer ;
5+
6+ import java .lang .annotation .Retention ;
7+ import java .lang .annotation .RetentionPolicy ;
8+
9+ import static org .assertj .core .api .Assertions .assertThat ;
10+
11+ @ Testcontainers
12+ class MetaAnnotationTest {
13+
14+ @ TcContainer
15+ private static final PostgreSQLContainer <?> POSTGRESQL = new PostgreSQLContainer <>(
16+ JUnitJupiterTestImages .POSTGRES_IMAGE
17+ );
18+
19+ @ Test
20+ void test () {
21+ assertThat (POSTGRESQL .isRunning ()).isTrue ();
22+ }
23+ }
24+
25+ @ Container
26+ @ Retention (RetentionPolicy .RUNTIME )
27+ @interface TcContainer {
28+ }
You can’t perform that action at this time.
0 commit comments