Made fields public for testing
This commit is contained in:
parent
47ebc7692c
commit
2651938878
2 changed files with 62 additions and 11 deletions
|
@ -49,17 +49,50 @@ import java.util.logging.Logger;
|
|||
*/
|
||||
public class JacocoReportOperation extends AbstractOperation<JacocoReportOperation> {
|
||||
private static final Logger LOGGER = Logger.getLogger(JacocoReportOperation.class.getName());
|
||||
private final List<File> classFiles = new ArrayList<>();
|
||||
private final List<File> execFiles = new ArrayList<>();
|
||||
private final List<File> sourceFiles = new ArrayList<>();
|
||||
private File csv;
|
||||
private String encoding;
|
||||
private File html;
|
||||
private String name = "JaCoCo Coverage Report";
|
||||
private BaseProject project;
|
||||
private boolean quiet;
|
||||
private int tabWidth = 4;
|
||||
private File xml;
|
||||
/**
|
||||
* The location of the java class files.
|
||||
*/
|
||||
final List<File> classFiles = new ArrayList<>();
|
||||
/**
|
||||
* The location of the exec files.
|
||||
*/
|
||||
final List<File> execFiles = new ArrayList<>();
|
||||
/**
|
||||
* The location of the source files.
|
||||
*/
|
||||
final List<File> sourceFiles = new ArrayList<>();
|
||||
/**
|
||||
* The location of the CSV report.
|
||||
*/
|
||||
File csv;
|
||||
/**
|
||||
* The source file encoding.
|
||||
*/
|
||||
String encoding;
|
||||
/**
|
||||
* The location of the HTML report.
|
||||
*/
|
||||
File html;
|
||||
/**
|
||||
* The report name.
|
||||
*/
|
||||
String name = "JaCoCo Coverage Report";
|
||||
/**
|
||||
* The project reference.
|
||||
*/
|
||||
BaseProject project;
|
||||
/**
|
||||
* The quiet flag.
|
||||
*/
|
||||
boolean quiet;
|
||||
/**
|
||||
* THe tab width.
|
||||
*/
|
||||
int tabWidth = 4;
|
||||
/**
|
||||
* THe location of the XML report
|
||||
*/
|
||||
File xml;
|
||||
|
||||
private IBundleCoverage analyze(ExecutionDataStore data) throws IOException {
|
||||
var builder = new CoverageBuilder();
|
||||
|
|
|
@ -17,9 +17,27 @@
|
|||
package rife.bld.extension;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
class JacocoReportOperationTest {
|
||||
final Path tempDir;
|
||||
|
||||
JacocoReportOperationTest() throws IOException {
|
||||
tempDir = Files.createTempDirectory("jacoco-test");
|
||||
}
|
||||
|
||||
JacocoReportOperation newJacocoReportOperation() {
|
||||
var o = new JacocoReportOperation();
|
||||
o.csv(new File(tempDir.toFile(), "jacoco.csv"));
|
||||
return o;
|
||||
}
|
||||
|
||||
@Test
|
||||
void executeTest() {
|
||||
assertThat(true).isTrue(); // TODO
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue