[velocity] Migrate tests to JUnit5

This commit is contained in:
Andreas Dangel
2022-10-03 10:25:24 +02:00
parent 008fe948c6
commit 5005ae56cb
11 changed files with 16 additions and 16 deletions

View File

@@ -91,8 +91,8 @@
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>

View File

@@ -4,14 +4,14 @@
package net.sourceforge.pmd.lang.vm;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import net.sourceforge.pmd.lang.vm.ast.VmParsingHelper;
/**
* Unit test for VM parsing.
*/
public class VmParserTest {
class VmParserTest {
private static final String VM_SRC = "<HTML><BODY>Hello $customer.Name <table> "
+ "#foreach($mud in $mudsOnSpecial)" + " #if ( $customer.hasPurchased($mud) )" + " <tr>" + " <td>"
@@ -29,17 +29,17 @@ public class VmParserTest {
// 2) stuff #end #end";
@Test
public void testParser() {
void testParser() {
VmParsingHelper.DEFAULT.parse(VM_SRC);
}
@Test
public void testParser2() {
void testParser2() {
VmParsingHelper.DEFAULT.parse(SRC2);
}
@Test
public void testParser3() {
void testParser3() {
VmParsingHelper.DEFAULT.parse(SRC3);
}

View File

@@ -6,6 +6,6 @@ package net.sourceforge.pmd.lang.vm.rule.bestpractices;
import net.sourceforge.pmd.testframework.PmdRuleTst;
public class AvoidReassigningParametersTest extends PmdRuleTst {
class AvoidReassigningParametersTest extends PmdRuleTst {
// no additional unit tests
}

View File

@@ -6,6 +6,6 @@ package net.sourceforge.pmd.lang.vm.rule.bestpractices;
import net.sourceforge.pmd.testframework.PmdRuleTst;
public class UnusedMacroParameterTest extends PmdRuleTst {
class UnusedMacroParameterTest extends PmdRuleTst {
// no additional unit tests
}

View File

@@ -6,6 +6,6 @@ package net.sourceforge.pmd.lang.vm.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
public class AvoidDeeplyNestedIfStmtsTest extends PmdRuleTst {
class AvoidDeeplyNestedIfStmtsTest extends PmdRuleTst {
// no additional unit tests
}

View File

@@ -6,6 +6,6 @@ package net.sourceforge.pmd.lang.vm.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
public class CollapsibleIfStatementsTest extends PmdRuleTst {
class CollapsibleIfStatementsTest extends PmdRuleTst {
// no additional unit tests
}

View File

@@ -6,6 +6,6 @@ package net.sourceforge.pmd.lang.vm.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
public class ExcessiveTemplateLengthTest extends PmdRuleTst {
class ExcessiveTemplateLengthTest extends PmdRuleTst {
// no additional unit tests
}

View File

@@ -6,6 +6,6 @@ package net.sourceforge.pmd.lang.vm.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
public class NoInlineJavaScriptTest extends PmdRuleTst {
class NoInlineJavaScriptTest extends PmdRuleTst {
// no additional unit tests
}

View File

@@ -6,6 +6,6 @@ package net.sourceforge.pmd.lang.vm.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
public class NoInlineStylesTest extends PmdRuleTst {
class NoInlineStylesTest extends PmdRuleTst {
// no additional unit tests
}

View File

@@ -6,6 +6,6 @@ package net.sourceforge.pmd.lang.vm.rule.errorprone;
import net.sourceforge.pmd.testframework.PmdRuleTst;
public class EmptyForeachStmtTest extends PmdRuleTst {
class EmptyForeachStmtTest extends PmdRuleTst {
// no additional unit tests
}

View File

@@ -6,6 +6,6 @@ package net.sourceforge.pmd.lang.vm.rule.errorprone;
import net.sourceforge.pmd.testframework.PmdRuleTst;
public class EmptyIfStmtTest extends PmdRuleTst {
class EmptyIfStmtTest extends PmdRuleTst {
// no additional unit tests
}