@@ -150,24 +150,22 @@ private void waitForCompletion(FreeStyleProject down, int n) throws Exception {
150
150
151
151
@ Test
152
152
public void testCaptureXml () throws Exception {
153
- j .executeOnServer (new Callable <Object >() {
154
- public Object call () throws Exception {
155
- JSONObject o = new JSONObject ()
156
- .accumulate ("name" , "foo" )
157
- .accumulate ("isVisible" , "" )
158
- .accumulate ("icon" , "star-gold" )
159
- .accumulate ("conditions" ,new JSONObject ()
160
- .accumulate ("hudson-plugins-promoted_builds-conditions-SelfPromotionCondition" ,
161
- new JSONObject ().accumulate ("evenIfUnstable" , false )));
162
- PromotionProcess p = PromotionProcess .fromJson (Stapler .getCurrentRequest (), o );
163
- assertEquals ("foo" , p .getName ());
164
- assertEquals ("star-gold" , p .getIcon ());
165
- assertEquals (1 , p .conditions .size ());
166
- assertEquals (0 , p .getBuildWrappers ().size ());
167
- assertNotNull (p .conditions .get (SelfPromotionCondition .class ));
168
- System .out .println (Items .XSTREAM2 .toXML (p ));
169
- return null ;
170
- }
153
+ j .executeOnServer (() -> {
154
+ JSONObject o = new JSONObject ()
155
+ .accumulate ("name" , "foo" )
156
+ .accumulate ("isVisible" , "" )
157
+ .accumulate ("icon" , "star-gold" )
158
+ .accumulate ("conditions" ,new JSONObject ()
159
+ .accumulate ("hudson-plugins-promoted_builds-conditions-SelfPromotionCondition" ,
160
+ new JSONObject ().accumulate ("evenIfUnstable" , false )));
161
+ PromotionProcess p = PromotionProcess .fromJson (Stapler .getCurrentRequest (), o );
162
+ assertEquals ("foo" , p .getName ());
163
+ assertEquals ("star-gold" , p .getIcon ());
164
+ assertEquals (1 , p .conditions .size ());
165
+ assertEquals (0 , p .getBuildWrappers ().size ());
166
+ assertNotNull (p .conditions .get (SelfPromotionCondition .class ));
167
+ System .out .println (Items .XSTREAM2 .toXML (p ));
168
+ return null ;
171
169
});
172
170
}
173
171
0 commit comments