@@ -388,10 +388,10 @@ public void specificResource() throws Exception {
388
388
this .initializer .onApplicationEvent (this .event );
389
389
String property = this .environment .getProperty ("my.property" );
390
390
assertThat (property , equalTo ("fromspecificlocation" ));
391
- assertThat (this .environment , containsProperySource ("applicationConfig: "
391
+ assertThat (this .environment , containsPropertySource ("applicationConfig: "
392
392
+ "[classpath:specificlocation.properties]" ));
393
393
// The default property source is still there
394
- assertThat (this .environment , containsProperySource ("applicationConfig: "
394
+ assertThat (this .environment , containsPropertySource ("applicationConfig: "
395
395
+ "[classpath:/application.properties]" ));
396
396
assertThat (this .environment .getProperty ("foo" ), equalTo ("bucket" ));
397
397
}
@@ -402,7 +402,7 @@ public void specificResourceAsFile() throws Exception {
402
402
EnvironmentTestUtils .addEnvironment (this .environment , "spring.config.location:"
403
403
+ location );
404
404
this .initializer .onApplicationEvent (this .event );
405
- assertThat (this .environment , containsProperySource ("applicationConfig: ["
405
+ assertThat (this .environment , containsPropertySource ("applicationConfig: ["
406
406
+ location + "]" ));
407
407
}
408
408
@@ -412,7 +412,7 @@ public void specificResourceDefaultsToFile() throws Exception {
412
412
EnvironmentTestUtils .addEnvironment (this .environment , "spring.config.location:"
413
413
+ location );
414
414
this .initializer .onApplicationEvent (this .event );
415
- assertThat (this .environment , containsProperySource ("applicationConfig: [file:"
415
+ assertThat (this .environment , containsPropertySource ("applicationConfig: [file:"
416
416
+ location + "]" ));
417
417
}
418
418
@@ -423,7 +423,7 @@ public void propertySourceAnnotation() throws Exception {
423
423
ConfigurableApplicationContext context = application .run ();
424
424
String property = context .getEnvironment ().getProperty ("my.property" );
425
425
assertThat (property , equalTo ("fromspecificlocation" ));
426
- assertThat (context .getEnvironment (), containsProperySource ("class path resource "
426
+ assertThat (context .getEnvironment (), containsPropertySource ("class path resource "
427
427
+ "[specificlocation.properties]" ));
428
428
context .close ();
429
429
}
@@ -439,7 +439,7 @@ public void propertySourceAnnotationWithPlaceholder() throws Exception {
439
439
ConfigurableApplicationContext context = application .run ();
440
440
String property = context .getEnvironment ().getProperty ("my.property" );
441
441
assertThat (property , equalTo ("fromspecificlocation" ));
442
- assertThat (context .getEnvironment (), containsProperySource ("class path resource "
442
+ assertThat (context .getEnvironment (), containsPropertySource ("class path resource "
443
443
+ "[specificlocation.properties]" ));
444
444
context .close ();
445
445
}
@@ -452,7 +452,7 @@ public void propertySourceAnnotationWithName() throws Exception {
452
452
ConfigurableApplicationContext context = application .run ();
453
453
String property = context .getEnvironment ().getProperty ("my.property" );
454
454
assertThat (property , equalTo ("fromspecificlocation" ));
455
- assertThat (context .getEnvironment (), containsProperySource ("foo" ));
455
+ assertThat (context .getEnvironment (), containsPropertySource ("foo" ));
456
456
context .close ();
457
457
}
458
458
@@ -465,9 +465,9 @@ public void propertySourceAnnotationInProfile() throws Exception {
465
465
.run ("--spring.profiles.active=myprofile" );
466
466
String property = context .getEnvironment ().getProperty ("my.property" );
467
467
assertThat (property , equalTo ("frompropertiesfile" ));
468
- assertThat (context .getEnvironment (), containsProperySource ("class path resource "
468
+ assertThat (context .getEnvironment (), containsPropertySource ("class path resource "
469
469
+ "[enableprofile.properties]" ));
470
- assertThat (context .getEnvironment (), not (containsProperySource ("classpath:/"
470
+ assertThat (context .getEnvironment (), not (containsPropertySource ("classpath:/"
471
471
+ "enableprofile-myprofile.properties" )));
472
472
context .close ();
473
473
}
@@ -480,7 +480,7 @@ public void propertySourceAnnotationAndNonActiveProfile() throws Exception {
480
480
ConfigurableApplicationContext context = application .run ();
481
481
String property = context .getEnvironment ().getProperty ("my.property" );
482
482
assertThat (property , equalTo ("fromapplicationproperties" ));
483
- assertThat (context .getEnvironment (), not (containsProperySource ("classpath:"
483
+ assertThat (context .getEnvironment (), not (containsPropertySource ("classpath:"
484
484
+ "/enableprofile-myprofile.properties" )));
485
485
context .close ();
486
486
}
@@ -493,7 +493,7 @@ public void propertySourceAnnotationMultipleLocations() throws Exception {
493
493
ConfigurableApplicationContext context = application .run ();
494
494
String property = context .getEnvironment ().getProperty ("my.property" );
495
495
assertThat (property , equalTo ("frommorepropertiesfile" ));
496
- assertThat (context .getEnvironment (), containsProperySource ("class path resource "
496
+ assertThat (context .getEnvironment (), containsPropertySource ("class path resource "
497
497
+ "[specificlocation.properties]" ));
498
498
context .close ();
499
499
}
@@ -506,7 +506,7 @@ public void propertySourceAnnotationMultipleLocationsAndName() throws Exception
506
506
ConfigurableApplicationContext context = application .run ();
507
507
String property = context .getEnvironment ().getProperty ("my.property" );
508
508
assertThat (property , equalTo ("frommorepropertiesfile" ));
509
- assertThat (context .getEnvironment (), containsProperySource ("foo" ));
509
+ assertThat (context .getEnvironment (), containsPropertySource ("foo" ));
510
510
context .close ();
511
511
}
512
512
@@ -545,7 +545,7 @@ public void bindsToSpringApplication() throws Exception {
545
545
assertThat ((Boolean ) field .get (application ), equalTo (false ));
546
546
}
547
547
548
- private static Matcher <? super ConfigurableEnvironment > containsProperySource (
548
+ private static Matcher <? super ConfigurableEnvironment > containsPropertySource (
549
549
final String sourceName ) {
550
550
return new TypeSafeDiagnosingMatcher <ConfigurableEnvironment >() {
551
551
@ Override
0 commit comments