File tree Expand file tree Collapse file tree 1 file changed +10
-14
lines changed
plugin-gradle/src/test/java/com/diffplug/gradle/spotless Expand file tree Collapse file tree 1 file changed +10
-14
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2016-2021 DiffPlug
2
+ * Copyright 2016-2023 DiffPlug
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
17
17
18
18
import java .io .IOException ;
19
19
20
- import org .junit .jupiter .api .Test ;
20
+ import org .junit .jupiter .params .ParameterizedTest ;
21
+ import org .junit .jupiter .params .provider .ValueSource ;
21
22
22
23
import com .diffplug .common .base .StringPrinter ;
23
24
24
- class GroovyGradleExtensionTest extends GradleIntegrationHarness {
25
+ /**
26
+ * We test GroovyGradleExtension only behaviors here.
27
+ */
28
+ class GroovyGradleExtensionTest extends GroovyExtensionTest {
25
29
private static final String HEADER = "//My tests header" ;
26
30
27
- @ Test
28
- void defaultTarget () throws IOException {
29
- testTarget (true );
30
- }
31
-
32
- @ Test
33
- void customTarget () throws IOException {
34
- testTarget (false );
35
- }
36
-
37
- private void testTarget (boolean useDefaultTarget ) throws IOException {
31
+ @ ParameterizedTest
32
+ @ ValueSource (booleans = {true , false })
33
+ void testTarget (boolean useDefaultTarget ) throws IOException {
38
34
String target = useDefaultTarget ? "" : "target 'other.gradle'" ;
39
35
String buildContent = StringPrinter .buildStringFromLines (
40
36
"plugins {" ,
You can’t perform that action at this time.
0 commit comments