Statistics
| Revision:

root / tmp / org.txm.core.tests / src / org / txm / scripts / macro / tests / DeleteTestMacro.groovy @ 1626

History | View | Annotate | Download (609 Bytes)

1
package org.txm.scripts.macro.tests
2

    
3
import java.io.File
4
import org.kohsuke.args4j.*
5
import groovy.transform.Field
6
import org.txm.rcp.swt.widget.parameters.*
7
import org.txm.Toolbox
8
import org.txm.rcp.commands.tests.*
9

    
10
@Field @Option(name="name", usage="The test name to delete", widget="String", required=true, def="test1")
11
String name
12

    
13
// Open the parameters input dialog box
14
if (!ParametersDialog.open(this)) return;
15

    
16
TestBench bench = GroovyTestBench.getTests();
17
Test test = bench.getTest(name)
18

    
19
if (test != null) {
20
        bench.deleteTest(test.getName())
21
} else {
22
        println "No test with name=$name to delete."
23
}