File tree Expand file tree Collapse file tree 4 files changed +109
-0
lines changed
src/test/java/org/codehaus/plexus/testing Expand file tree Collapse file tree 4 files changed +109
-0
lines changed Original file line number Diff line number Diff line change 6969 <artifactId >junit-jupiter-api</artifactId >
7070 <version >5.7.2</version >
7171 </dependency >
72+ <dependency >
73+ <groupId >org.junit.jupiter</groupId >
74+ <artifactId >junit-jupiter-engine</artifactId >
75+ <version >5.7.2</version >
76+ <scope >test</scope >
77+ </dependency >
7278 </dependencies >
7379
7480</project >
Original file line number Diff line number Diff line change 1+ package org .codehaus .plexus .testing ;
2+
3+ /*
4+ * Licensed to the Apache Software Foundation (ASF) under one
5+ * or more contributor license agreements. See the NOTICE file
6+ * distributed with this work for additional information
7+ * regarding copyright ownership. The ASF licenses this file
8+ * to you under the Apache License, Version 2.0 (the
9+ * "License"); you may not use this file except in compliance
10+ * with the License. You may obtain a copy of the License at
11+ *
12+ * http://www.apache.org/licenses/LICENSE-2.0
13+ *
14+ * Unless required by applicable law or agreed to in writing,
15+ * software distributed under the License is distributed on an
16+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17+ * KIND, either express or implied. See the License for the
18+ * specific language governing permissions and limitations
19+ * under the License.
20+ */
21+
22+ import static org .junit .jupiter .api .Assertions .assertNotNull ;
23+
24+ import org .junit .jupiter .api .Test ;
25+
26+ import javax .inject .Inject ;
27+
28+ @ PlexusTest
29+ class PlexusTestTest
30+ {
31+
32+ @ Inject
33+ private TestComponent testComponent ;
34+
35+ @ Test
36+ void dependencyShouldBeInjected ()
37+ {
38+ assertNotNull ( testComponent );
39+ assertNotNull ( testComponent .getTestComponent2 () );
40+ }
41+ }
Original file line number Diff line number Diff line change 1+ package org .codehaus .plexus .testing ;
2+
3+ /*
4+ * Licensed to the Apache Software Foundation (ASF) under one
5+ * or more contributor license agreements. See the NOTICE file
6+ * distributed with this work for additional information
7+ * regarding copyright ownership. The ASF licenses this file
8+ * to you under the Apache License, Version 2.0 (the
9+ * "License"); you may not use this file except in compliance
10+ * with the License. You may obtain a copy of the License at
11+ *
12+ * http://www.apache.org/licenses/LICENSE-2.0
13+ *
14+ * Unless required by applicable law or agreed to in writing,
15+ * software distributed under the License is distributed on an
16+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17+ * KIND, either express or implied. See the License for the
18+ * specific language governing permissions and limitations
19+ * under the License.
20+ */
21+
22+ import javax .inject .Inject ;
23+ import javax .inject .Named ;
24+
25+ @ Named
26+ public class TestComponent
27+ {
28+ @ Inject
29+ private TestComponent2 testComponent2 ;
30+
31+ public TestComponent2 getTestComponent2 ()
32+ {
33+ return testComponent2 ;
34+ }
35+ }
Original file line number Diff line number Diff line change 1+ package org .codehaus .plexus .testing ;
2+
3+ /*
4+ * Licensed to the Apache Software Foundation (ASF) under one
5+ * or more contributor license agreements. See the NOTICE file
6+ * distributed with this work for additional information
7+ * regarding copyright ownership. The ASF licenses this file
8+ * to you under the Apache License, Version 2.0 (the
9+ * "License"); you may not use this file except in compliance
10+ * with the License. You may obtain a copy of the License at
11+ *
12+ * http://www.apache.org/licenses/LICENSE-2.0
13+ *
14+ * Unless required by applicable law or agreed to in writing,
15+ * software distributed under the License is distributed on an
16+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17+ * KIND, either express or implied. See the License for the
18+ * specific language governing permissions and limitations
19+ * under the License.
20+ */
21+
22+ import javax .inject .Named ;
23+
24+ @ Named
25+ public class TestComponent2
26+ {
27+ }
You can’t perform that action at this time.
0 commit comments