Fixed BaseProjectBlueprint init in tests

This commit is contained in:
Erik C. Thauvin 2025-01-14 00:08:10 -08:00
parent 48952f505f
commit 99691fb2e9
Signed by: erik
GPG key ID: 776702A6A2DA330E

View file

@ -245,7 +245,7 @@ class DetektOperationTest {
var op = new DetektOperation()
.fromProject(new BaseProjectBlueprint(new File("examples"), "com.example",
"Example"))
"example", "Example"))
.baseline(baseline)
.createBaseline(true);
op.execute();
@ -260,7 +260,7 @@ class DetektOperationTest {
void testExampleMaxIssues() {
var op = new DetektOperation()
.fromProject(new BaseProjectBlueprint(new File("examples"), "com.example",
"Example"))
"example", "Example"))
.maxIssues(8);
assertThatNoException().isThrownBy(op::execute);
}
@ -277,7 +277,7 @@ class DetektOperationTest {
var op = new DetektOperation()
.fromProject(new BaseProjectBlueprint(new File("examples"), "com.example",
"Example"))
"example", "Example"))
.report(new Report(ReportId.HTML, html.getAbsolutePath()))
.report(new Report(ReportId.XML, xml.getAbsolutePath()))
.report(new Report(ReportId.TXT, txt.getAbsolutePath()))
@ -295,7 +295,7 @@ class DetektOperationTest {
void testExamplesExecute() {
var op = new DetektOperation()
.fromProject(new BaseProjectBlueprint(new File("examples"), "com.example",
"Example"))
"example", "Example"))
.debug(true);
assertThatThrownBy(op::execute).isInstanceOf(ExitStatusException.class);
}