diff --git a/pom.xml b/pom.xml index 5017466..79f4a9c 100644 --- a/pom.xml +++ b/pom.xml @@ -75,15 +75,14 @@ limitations under the License. - org.eclipse.sisu - org.eclipse.sisu.inject - 0.9.0.M4 + org.junit.jupiter + junit-jupiter-api test - - org.junit.jupiter - junit-jupiter-api + org.codehaus.plexus + plexus-testing + 1.6.1 test @@ -92,12 +91,6 @@ limitations under the License. ${slf4jVersion} test - - com.google.inject - guice - 6.0.0 - test - diff --git a/src/test/java/org/codehaus/plexus/velocity/DefaultVelocityComponentTest.java b/src/test/java/org/codehaus/plexus/velocity/DefaultVelocityComponentTest.java index 7fbcd53..64dcd01 100644 --- a/src/test/java/org/codehaus/plexus/velocity/DefaultVelocityComponentTest.java +++ b/src/test/java/org/codehaus/plexus/velocity/DefaultVelocityComponentTest.java @@ -16,36 +16,35 @@ * limitations under the License. */ +import javax.inject.Inject; + import java.io.StringWriter; import org.apache.velocity.Template; import org.apache.velocity.VelocityContext; -import org.eclipse.sisu.launch.InjectedTest; +import org.codehaus.plexus.testing.PlexusTest; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; -public class DefaultVelocityComponentTest extends InjectedTest { - @Test - public void testBasic() { - VelocityComponent velocity; - - VelocityContext context; +@PlexusTest +public class DefaultVelocityComponentTest { - String value; + @Inject + private VelocityComponent velocity; - velocity = lookup(VelocityComponent.class); + @Test + public void testBasic() { // test the properties - value = (String) velocity.getEngine().getProperty("hello"); + String value = (String) velocity.getEngine().getProperty("hello"); assertNotNull(value); - assertEquals("world", value); // test the rendering - context = new VelocityContext(); + VelocityContext context = new VelocityContext(); context.put("variable", "Value from context");