165
165
* @author Moritz Halbritter
166
166
* @author Tadaya Tsuyukubo
167
167
* @author Yanming Zhou
168
+ * @author Sijun Yang
168
169
*/
169
170
@ ExtendWith (OutputCaptureExtension .class )
170
171
class SpringApplicationTests {
@@ -252,13 +253,13 @@ void logsActiveProfilesWithoutProfileAndSingleDefault(CapturedOutput output) {
252
253
@ Test
253
254
void logsActiveProfilesWithoutProfileAndMultipleDefaults (CapturedOutput output ) {
254
255
MockEnvironment environment = new MockEnvironment ();
255
- environment .setDefaultProfiles ("p0,p1 " , "default" );
256
+ environment .setDefaultProfiles ("p0" , "default" );
256
257
SpringApplication application = new SpringApplication (ExampleConfig .class );
257
258
application .setWebApplicationType (WebApplicationType .NONE );
258
259
application .setEnvironment (environment );
259
260
this .context = application .run ();
260
261
assertThat (output )
261
- .contains ("No active profile set, falling back to 2 default profiles: \" p0,p1 \" , \" default\" " );
262
+ .contains ("No active profile set, falling back to 2 default profiles: \" p0\" , \" default\" " );
262
263
}
263
264
264
265
@ Test
@@ -273,9 +274,9 @@ void logsActiveProfilesWithSingleProfile(CapturedOutput output) {
273
274
void logsActiveProfilesWithMultipleProfiles (CapturedOutput output ) {
274
275
SpringApplication application = new SpringApplication (ExampleConfig .class );
275
276
application .setWebApplicationType (WebApplicationType .NONE );
276
- application .setAdditionalProfiles ("p1,p2 " , "p3 " );
277
+ application .setAdditionalProfiles ("p1" , "p2 " );
277
278
application .run ();
278
- assertThat (output ).contains ("The following 2 profiles are active: \" p1,p2 \" , \" p3 \" " );
279
+ assertThat (output ).contains ("The following 2 profiles are active: \" p1\" , \" p2 \" " );
279
280
}
280
281
281
282
@ Test
0 commit comments