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 11/*
2- * Copyright 2016-2021 DiffPlug
2+ * Copyright 2016-2023 DiffPlug
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
1717
1818import java .io .IOException ;
1919
20- import org .junit .jupiter .api .Test ;
20+ import org .junit .jupiter .params .ParameterizedTest ;
21+ import org .junit .jupiter .params .provider .ValueSource ;
2122
2223import com .diffplug .common .base .StringPrinter ;
2324
24- class GroovyGradleExtensionTest extends GradleIntegrationHarness {
25+ /**
26+ * We test GroovyGradleExtension only behaviors here.
27+ */
28+ class GroovyGradleExtensionTest extends GroovyExtensionTest {
2529 private static final String HEADER = "//My tests header" ;
2630
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 {
3834 String target = useDefaultTarget ? "" : "target 'other.gradle'" ;
3935 String buildContent = StringPrinter .buildStringFromLines (
4036 "plugins {" ,
You can’t perform that action at this time.
0 commit comments