[BAEL-14274] - Fixed article code for https://www.baeldung.com/spring-bean-scopes
This commit is contained in:
parent
883f0a525b
commit
26c28f9815
@ -12,7 +12,7 @@ public class ScopesIntegrationTest {
|
||||
private static final String NAME_OTHER = "Anna Jones";
|
||||
|
||||
@Test
|
||||
public void testScopeSingleton() {
|
||||
public void givenSingletonScope_whenSetName_thenEqualNames() {
|
||||
final ApplicationContext applicationContext = new ClassPathXmlApplicationContext("scopes.xml");
|
||||
|
||||
final Person personSingletonA = (Person) applicationContext.getBean("personSingleton");
|
||||
@ -25,7 +25,7 @@ public class ScopesIntegrationTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testScopePrototype() {
|
||||
public void givenPrototypeScope_whenSetNames_thenDifferentNames() {
|
||||
final ApplicationContext applicationContext = new ClassPathXmlApplicationContext("scopes.xml");
|
||||
|
||||
final Person personPrototypeA = (Person) applicationContext.getBean("personPrototype");
|
||||
|
Loading…
x
Reference in New Issue
Block a user