File tree Expand file tree Collapse file tree 2 files changed +16
-24
lines changed
src/test/java/org/codehaus/plexus/velocity Expand file tree Collapse file tree 2 files changed +16
-24
lines changed Original file line number Diff line number Diff line change @@ -75,15 +75,14 @@ limitations under the License.
7575 </dependency >
7676
7777 <dependency >
78- <groupId >org.eclipse.sisu</groupId >
79- <artifactId >org.eclipse.sisu.inject</artifactId >
80- <version >0.9.0.M4</version >
78+ <groupId >org.junit.jupiter</groupId >
79+ <artifactId >junit-jupiter-api</artifactId >
8180 <scope >test</scope >
8281 </dependency >
83-
8482 <dependency >
85- <groupId >org.junit.jupiter</groupId >
86- <artifactId >junit-jupiter-api</artifactId >
83+ <groupId >org.codehaus.plexus</groupId >
84+ <artifactId >plexus-testing</artifactId >
85+ <version >1.6.1</version >
8786 <scope >test</scope >
8887 </dependency >
8988 <dependency >
@@ -92,12 +91,6 @@ limitations under the License.
9291 <version >${slf4jVersion} </version >
9392 <scope >test</scope >
9493 </dependency >
95- <dependency >
96- <groupId >com.google.inject</groupId >
97- <artifactId >guice</artifactId >
98- <version >6.0.0</version >
99- <scope >test</scope >
100- </dependency >
10194 </dependencies >
10295
10396 <build >
Original file line number Diff line number Diff line change 1616 * limitations under the License.
1717 */
1818
19+ import javax .inject .Inject ;
20+
1921import java .io .StringWriter ;
2022
2123import org .apache .velocity .Template ;
2224import org .apache .velocity .VelocityContext ;
23- import org .eclipse . sisu . launch . InjectedTest ;
25+ import org .codehaus . plexus . testing . PlexusTest ;
2426import org .junit .jupiter .api .Test ;
2527
2628import static org .junit .jupiter .api .Assertions .assertEquals ;
2729import static org .junit .jupiter .api .Assertions .assertNotNull ;
2830
29- public class DefaultVelocityComponentTest extends InjectedTest {
30- @ Test
31- public void testBasic () {
32- VelocityComponent velocity ;
33-
34- VelocityContext context ;
31+ @ PlexusTest
32+ public class DefaultVelocityComponentTest {
3533
36- String value ;
34+ @ Inject
35+ private VelocityComponent velocity ;
3736
38- velocity = lookup (VelocityComponent .class );
37+ @ Test
38+ public void testBasic () {
3939
4040 // test the properties
41- value = (String ) velocity .getEngine ().getProperty ("hello" );
41+ String value = (String ) velocity .getEngine ().getProperty ("hello" );
4242
4343 assertNotNull (value );
44-
4544 assertEquals ("world" , value );
4645
4746 // test the rendering
48- context = new VelocityContext ();
47+ VelocityContext context = new VelocityContext ();
4948
5049 context .put ("variable" , "Value from context" );
5150
You can’t perform that action at this time.
0 commit comments