Merge pull request #7220 from amit2103/BAEL-14274-21
[BAEL-14274] - Fixed article code for https://www.baeldung.com/spring…
This commit is contained in:
commit
94705db20a
|
@ -12,7 +12,7 @@ public class ScopesIntegrationTest {
|
||||||
private static final String NAME_OTHER = "Anna Jones";
|
private static final String NAME_OTHER = "Anna Jones";
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testScopeSingleton() {
|
public void givenSingletonScope_whenSetName_thenEqualNames() {
|
||||||
final ApplicationContext applicationContext = new ClassPathXmlApplicationContext("scopes.xml");
|
final ApplicationContext applicationContext = new ClassPathXmlApplicationContext("scopes.xml");
|
||||||
|
|
||||||
final Person personSingletonA = (Person) applicationContext.getBean("personSingleton");
|
final Person personSingletonA = (Person) applicationContext.getBean("personSingleton");
|
||||||
|
@ -25,7 +25,7 @@ public class ScopesIntegrationTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testScopePrototype() {
|
public void givenPrototypeScope_whenSetNames_thenDifferentNames() {
|
||||||
final ApplicationContext applicationContext = new ClassPathXmlApplicationContext("scopes.xml");
|
final ApplicationContext applicationContext = new ClassPathXmlApplicationContext("scopes.xml");
|
||||||
|
|
||||||
final Person personPrototypeA = (Person) applicationContext.getBean("personPrototype");
|
final Person personPrototypeA = (Person) applicationContext.getBean("personPrototype");
|
||||||
|
|
Loading…
Reference in New Issue