Constructor and Description |
---|
AppliedFix() |
Modifier and Type | Method and Description |
---|---|
HintTest.AppliedFix |
assertCompilable()
Require that the result is compilable.
|
HintTest.AppliedFix |
assertCompilable(String fileName)
Require that the given resulting file is compilable.
|
HintTest.AppliedFix |
assertOutput(String code)
Verify the content of the resulting file.
|
HintTest.AppliedFix |
assertOutput(String fileName,
String code)
Verify the content of the given resulting file.
|
HintTest.AppliedFix |
assertVerbatimOutput(String code)
Verify the content of the resulting file.
|
HintTest.AppliedFix |
assertVerbatimOutput(String fileName,
String code)
Verify the content of the given resulting file.
|
String |
getOutput()
Return code after the fix has been applied.
|
String |
getOutput(String fileName)
Return code after the fix has been applied.
|
public HintTest.AppliedFix assertCompilable() throws Exception
assertCompilable("test/Test.java")
AssertionError
- if the result is not compilableException
public HintTest.AppliedFix assertCompilable(String fileName) throws Exception
fileName
- the name of the file that should be verifiedAssertionError
- if the result is not compilableException
public HintTest.AppliedFix assertOutput(String code) throws Exception
assertOutput("test/Test.java")
.
This method will "normalize" whitespaces in the file: generally, all
whitespaces are reduced to a single space both in the given code and
the code read from the file, before the comparison.code
- expected content of the resulting file.AssertionError
- if the file does not have the correct contentException
public HintTest.AppliedFix assertOutput(String fileName, String code) throws Exception
fileName
- the name of the file that should be verifiedcode
- expected content of the resulting file.AssertionError
- if the file does not have the correct contentException
public HintTest.AppliedFix assertVerbatimOutput(String code) throws Exception
assertVerbatimOutput("test/Test.java")
.
This method will compare the content of the file exactly with the provided
code.code
- expected content of the resulting file.AssertionError
- if the result is not compilableException
public HintTest.AppliedFix assertVerbatimOutput(String fileName, String code) throws Exception
fileName
- the name of the file that should be verifiedcode
- expected content of the resulting file.AssertionError
- if the result is not compilableException
public String getOutput() throws Exception
Exception