import static org.junit.Assert.assertTrue;
import org.junit.Before;
import org.junit.Test;
public class SwiftTest {
SwiftUtil swiftUtil = new SwiftUtil();
boolean result;
@Test
public void checkInPathFolder()
{
result = swiftUtil.checkInPathFolder();
assertTrue(result);
}
@Test
public void checkCustomObjectExists()
{
result=swiftUtil.validateWFId();
assertTrue(result);
}
@Test
public void runSwift()
{
result=swiftUtil.runSwiftBatch();
assertTrue(result);
}
@Test
public void checkTreatedFolder()
{
result=swiftUtil.checkTreatedFolder();
assertTrue(result);
}
@Test
public void checkExceptionFolder()
{
result=swiftUtil.checkExceptionFolder();
assertTrue(result);
}
}
Above is my Test case. based on two cases i want to execute set of above test methods.
For eg:
checkInPathFolder()
, checkCustomObjectExists()
, runSwift()
should be executed. checkInPathFolder()
, runSwift()
, checkExceptionFolder()
should be executed.Use JUnit's assume
mechanism described here. You will need to use either Theories
of Parameterized
to cause JUnit
to execute more than once if you want to drive those two conditions.