@@ -39,17 +39,6 @@ class TestBuildInfoPluginFuncTest extends AbstractGradleFuncTest {
39
39
}
40
40
"""
41
41
42
- when :
43
- def result = gradleRunner(' generateTestBuildInfo' ). build()
44
- def task = result. task(" :generateTestBuildInfo" )
45
-
46
-
47
- then :
48
- task. outcome == TaskOutcome . SUCCESS
49
-
50
- def output = file(" build/generated-build-info/plugin-test-build-info.json" )
51
- output. exists() == true
52
-
53
42
def location = Map . of(
54
43
" module" , " com.example" ,
55
44
" representative_class" , " com/example/Example.class"
@@ -58,6 +47,15 @@ class TestBuildInfoPluginFuncTest extends AbstractGradleFuncTest {
58
47
" component" , " example-component" ,
59
48
" locations" , List . of(location)
60
49
)
50
+
51
+ def output = file(" build/generated-build-info/plugin-test-build-info.json" )
52
+
53
+ when :
54
+ def result = gradleRunner(' generateTestBuildInfo' ). build()
55
+
56
+ then :
57
+ result. task(" :generateTestBuildInfo" ). outcome == TaskOutcome . SUCCESS
58
+ output. exists() == true
61
59
new ObjectMapper (). readValue(output, Map . class) == expectedOutput
62
60
}
63
61
@@ -87,16 +85,7 @@ class TestBuildInfoPluginFuncTest extends AbstractGradleFuncTest {
87
85
}
88
86
"""
89
87
90
- when :
91
- def result = gradleRunner(' generateTestBuildInfo' ). build()
92
- def task = result. task(" :generateTestBuildInfo" )
93
-
94
-
95
- then :
96
- task. outcome == TaskOutcome . SUCCESS
97
-
98
88
def output = file(" build/generated-build-info/plugin-test-build-info.json" )
99
- output. exists() == true
100
89
101
90
def locationFromModuleInfo = Map . of(
102
91
" module" , " org.objectweb.asm" ,
@@ -115,7 +104,12 @@ class TestBuildInfoPluginFuncTest extends AbstractGradleFuncTest {
115
104
" locations" , List . of(locationFromModuleInfo, locationFromManifest, locationFromJarFileName)
116
105
)
117
106
118
- def value = new ObjectMapper (). readValue(output, Map . class)
119
- value == expectedOutput
107
+ when :
108
+ def result = gradleRunner(' generateTestBuildInfo' ). build()
109
+
110
+ then :
111
+ result. task(" :generateTestBuildInfo" ). outcome == TaskOutcome . SUCCESS
112
+ output. exists() == true
113
+ new ObjectMapper (). readValue(output, Map . class) == expectedOutput
120
114
}
121
115
}
0 commit comments