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> {
|
public class JacocoReportOperation extends AbstractOperation<JacocoReportOperation> {
|
||||||
private static final Logger LOGGER = Logger.getLogger(JacocoReportOperation.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(JacocoReportOperation.class.getName());
|
||||||
private final List<File> classFiles = new ArrayList<>();
|
/**
|
||||||
private final List<File> execFiles = new ArrayList<>();
|
* The location of the java class files.
|
||||||
private final List<File> sourceFiles = new ArrayList<>();
|
*/
|
||||||
private File csv;
|
final List<File> classFiles = new ArrayList<>();
|
||||||
private String encoding;
|
/**
|
||||||
private File html;
|
* The location of the exec files.
|
||||||
private String name = "JaCoCo Coverage Report";
|
*/
|
||||||
private BaseProject project;
|
final List<File> execFiles = new ArrayList<>();
|
||||||
private boolean quiet;
|
/**
|
||||||
private int tabWidth = 4;
|
* The location of the source files.
|
||||||
private File xml;
|
*/
|
||||||
|
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 {
|
private IBundleCoverage analyze(ExecutionDataStore data) throws IOException {
|
||||||
var builder = new CoverageBuilder();
|
var builder = new CoverageBuilder();
|
||||||
|
|
|
@ -17,9 +17,27 @@
|
||||||
package rife.bld.extension;
|
package rife.bld.extension;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
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;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
class JacocoReportOperationTest {
|
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
|
@Test
|
||||||
void executeTest() {
|
void executeTest() {
|
||||||
assertThat(true).isTrue(); // TODO
|
assertThat(true).isTrue(); // TODO
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue