Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

followup on pull #178 #180

Merged
merged 6 commits into from

2 participants

This page is out of date. Refresh to see the latest.
View
4 doc/ant.html
@@ -137,8 +137,8 @@ <h2 align="center">TestNG Ant Task</h2>
<tr>
<td><tt>mode</tt></td>
- <td>Either <tt>TESTNG</tt>, <tt>JUNIT</tt> or <tt>MIXED</tt>. Whether TestNG should run only TestNG tests, JUnit tests or both.</td>
- <td>No. Defaults to TESTNG.</td>
+ <td>Either <tt>"testng"</tt>, <tt>"junit"</tt> or <tt>"mixed"</tt>. Whether TestNG should run only TestNG tests, JUnit tests or both.</td>
+ <td>No. Defaults to "testng".</td>
</tr>
<tr>
View
3  doc/migrating.html
@@ -90,8 +90,7 @@ <h2 align="center">Migrating from JUnit</h2>
&lt;propertyref prefix="test-sys-prop."/&gt;
&lt;mapper from="test-sys-prop.*" to="*" type="glob"/&gt;
&lt;/propertyset&gt;
- &lt;jvmarg line="${run.jvmargs.prop}"/&gt;
- &lt;jvmarg line="${endorsed.classpath.cmd.line.arg}"/&gt;
+ &lt;jvmarg line="${run.jvmargs}"/&gt;
&lt;/testng&gt;
</pre>
View
5 src/main/java/org/testng/TestNG.java
@@ -517,7 +517,10 @@ public void setTestClasses(Class[] classes) {
//
Set<Class> classes = Sets.newHashSet();
for (String m : commandLineMethods) {
- classes.add(ClassHelper.forName(splitMethod(m)[0]));
+ Class c = ClassHelper.forName(splitMethod(m)[0]);
+ if (c != null) {
+ classes.add(c);
+ }
}
List<XmlSuite> result = createCommandLineSuitesForClasses(classes.toArray(new Class[0]));
View
11 src/main/java/org/testng/TestNGAntTask.java
@@ -150,10 +150,11 @@
private String m_testName="Ant test";
private Boolean m_skipFailedInvocationCounts;
private String m_methods;
- private Mode mode = Mode.TESTNG;
+ private Mode mode = Mode.testng;
public enum Mode {
- TESTNG, JUNIT, MIXED;
+ //lower-case to better look in build scripts
+ testng, junit, mixed;
}
/**
@@ -371,7 +372,7 @@ public void setTestName(String s) {
// TestNG settings
public void setJUnit(boolean value) {
- mode = value ? Mode.JUNIT : Mode.TESTNG;
+ mode = value ? Mode.junit : Mode.testng;
}
// TestNG settings
@@ -537,8 +538,8 @@ public void execute() throws BuildException {
private List<String> createArguments() {
List<String> argv= Lists.newArrayList();
- addBooleanIfTrue(argv, CommandLineArgs.JUNIT, mode == Mode.JUNIT);
- addBooleanIfTrue(argv, CommandLineArgs.MIXED, mode == Mode.MIXED);
+ addBooleanIfTrue(argv, CommandLineArgs.JUNIT, mode == Mode.junit);
+ addBooleanIfTrue(argv, CommandLineArgs.MIXED, mode == Mode.mixed);
addBooleanIfTrue(argv, CommandLineArgs.SKIP_FAILED_INVOCATION_COUNTS, m_skipFailedInvocationCounts);
addIntegerIfNotNull(argv, CommandLineArgs.LOG, m_verbose);
addDefaultListeners(argv);
Something went wrong with that request. Please try again.