
com.github.dakusui.floorplan.tdesc.junit4.TestBase Maven / Gradle / Ivy
package com.github.dakusui.floorplan.tdesc.junit4;
import com.github.dakusui.actionunit.actions.Named;
import com.github.dakusui.actionunit.core.Context;
import com.github.dakusui.floorplan.tdesc.TestSuiteDescriptor;
import com.github.dakusui.floorplan.tdesc.junit4.runner.FloorPlanParametersRunnerFactory;
import com.github.dakusui.floorplan.tdesc.junit4.runner.FloorPlanRunner;
import com.github.dakusui.floorplan.utils.InternalUtils;
import org.junit.AfterClass;
import org.junit.AssumptionViolatedException;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
import org.junit.runner.RunWith;
import org.junit.runners.MethodSorters;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.UseParametersRunnerFactory;
import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.IntStream;
import static com.github.dakusui.actionunit.core.ActionSupport.*;
import static com.github.dakusui.floorplan.utils.InternalUtils.newContext;
import static java.util.stream.Collectors.toList;
@RunWith(FloorPlanRunner.class)
@UseParametersRunnerFactory(FloorPlanParametersRunnerFactory.class)
@FixMethodOrder(MethodSorters.JVM)
public class TestBase {
protected final String testCaseName;
protected final Map> testActionFactories;
protected final LinkedList testOracleNames;
protected final String testSuiteName;
protected final Context context = newContext();
@SuppressWarnings("WeakerAccess")
protected TestBase(String testSuiteName, String testCaseName, Map> testActionFactories) {
this.testSuiteName = testSuiteName;
this.testActionFactories = testActionFactories;
this.testOracleNames = new LinkedList<>(testActionFactories.keySet());
this.testCaseName = testCaseName;
}
@Parameterized.Parameters(name = "{index}:{0}")
public static Collection
© 2015 - 2025 Weber Informatics LLC | Privacy Policy