@TestInstance(value=PER_CLASS) public abstract class CheckTestBase extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,CheckInfo> |
checkInfoBySimpleClassName
Maps simple class names to the corresponding check info.
|
protected java.lang.Class<?> |
markerClass |
Modifier | Constructor and Description |
---|---|
protected |
CheckTestBase(java.lang.Class<?> markerClass) |
Modifier and Type | Method and Description |
---|---|
static java.util.Map<java.lang.String,CheckInfo> |
buildCheckInfoMap(java.lang.Class<?> clazz)
Builds a map from simple class names to check infos.
|
static ELanguage |
determineLanguage(CheckInfo checkInfo,
java.lang.String uniformPath)
Determines the language to use for the test file based on the
ELanguage s of the check and the ending of the uniform path. |
protected void |
runCheckAndAssertFindings(java.lang.String checkSimpleName,
ExpectedDataContainer expectedDataContainer,
java.util.Map<java.lang.String,java.lang.Object> options,
java.util.Map<java.lang.String,CheckInfo> checkInfoBySimpleClassName)
Asserts that the check executed on the given code file returns the findings
as described by the findings string.
|
protected void |
setUpCheckInfoMap() |
protected java.util.Map<java.lang.String,CheckInfo> checkInfoBySimpleClassName
protected final java.lang.Class<?> markerClass
protected CheckTestBase(java.lang.Class<?> markerClass)
@BeforeEach protected void setUpCheckInfoMap() throws java.io.IOException
java.io.IOException
public static ELanguage determineLanguage(CheckInfo checkInfo, java.lang.String uniformPath)
ELanguage
s of the check and the ending of the uniform path.public static java.util.Map<java.lang.String,CheckInfo> buildCheckInfoMap(java.lang.Class<?> clazz) throws java.io.IOException
java.io.IOException
protected void runCheckAndAssertFindings(java.lang.String checkSimpleName, ExpectedDataContainer expectedDataContainer, java.util.Map<java.lang.String,java.lang.Object> options, java.util.Map<java.lang.String,CheckInfo> checkInfoBySimpleClassName) throws CheckException
CheckException