|
|
|
@ -78,18 +78,14 @@ public class GroovyScriptFactoryTests { |
|
|
|
assertThat(AopUtils.isAopProxy(calc)).as("Shouldn't get proxy when refresh is disabled").isFalse(); |
|
|
|
assertThat(AopUtils.isAopProxy(calc)).as("Shouldn't get proxy when refresh is disabled").isFalse(); |
|
|
|
assertThat(AopUtils.isAopProxy(messenger)).as("Shouldn't get proxy when refresh is disabled").isFalse(); |
|
|
|
assertThat(AopUtils.isAopProxy(messenger)).as("Shouldn't get proxy when refresh is disabled").isFalse(); |
|
|
|
|
|
|
|
|
|
|
|
boolean condition3 = calc instanceof Refreshable; |
|
|
|
assertThat(calc instanceof Refreshable).as("Scripted object should not be instance of Refreshable").isFalse(); |
|
|
|
assertThat(condition3).as("Scripted object should not be instance of Refreshable").isFalse(); |
|
|
|
assertThat(messenger instanceof Refreshable).as("Scripted object should not be instance of Refreshable").isFalse(); |
|
|
|
boolean condition2 = messenger instanceof Refreshable; |
|
|
|
|
|
|
|
assertThat(condition2).as("Scripted object should not be instance of Refreshable").isFalse(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assertThat(calc).isEqualTo(calc); |
|
|
|
assertThat(calc).isEqualTo(calc); |
|
|
|
assertThat(messenger).isEqualTo(messenger); |
|
|
|
assertThat(messenger).isEqualTo(messenger); |
|
|
|
boolean condition1 = !messenger.equals(calc); |
|
|
|
assertThat(messenger).isNotEqualTo(calc); |
|
|
|
assertThat(condition1).isTrue(); |
|
|
|
|
|
|
|
assertThat(messenger.hashCode()).isNotEqualTo(calc.hashCode()); |
|
|
|
assertThat(messenger.hashCode()).isNotEqualTo(calc.hashCode()); |
|
|
|
boolean condition = !messenger.toString().equals(calc.toString()); |
|
|
|
assertThat(messenger.toString()).isNotEqualTo(calc.toString()); |
|
|
|
assertThat(condition).isTrue(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String desiredMessage = "Hello World!"; |
|
|
|
String desiredMessage = "Hello World!"; |
|
|
|
assertThat(messenger.getMessage()).as("Message is incorrect").isEqualTo(desiredMessage); |
|
|
|
assertThat(messenger.getMessage()).as("Message is incorrect").isEqualTo(desiredMessage); |
|
|
|
@ -111,18 +107,14 @@ public class GroovyScriptFactoryTests { |
|
|
|
assertThat(AopUtils.isAopProxy(calc)).as("Shouldn't get proxy when refresh is disabled").isFalse(); |
|
|
|
assertThat(AopUtils.isAopProxy(calc)).as("Shouldn't get proxy when refresh is disabled").isFalse(); |
|
|
|
assertThat(AopUtils.isAopProxy(messenger)).as("Shouldn't get proxy when refresh is disabled").isFalse(); |
|
|
|
assertThat(AopUtils.isAopProxy(messenger)).as("Shouldn't get proxy when refresh is disabled").isFalse(); |
|
|
|
|
|
|
|
|
|
|
|
boolean condition3 = calc instanceof Refreshable; |
|
|
|
assertThat(calc instanceof Refreshable).as("Scripted object should not be instance of Refreshable").isFalse(); |
|
|
|
assertThat(condition3).as("Scripted object should not be instance of Refreshable").isFalse(); |
|
|
|
assertThat(messenger instanceof Refreshable).as("Scripted object should not be instance of Refreshable").isFalse(); |
|
|
|
boolean condition2 = messenger instanceof Refreshable; |
|
|
|
|
|
|
|
assertThat(condition2).as("Scripted object should not be instance of Refreshable").isFalse(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assertThat(calc).isEqualTo(calc); |
|
|
|
assertThat(calc).isEqualTo(calc); |
|
|
|
assertThat(messenger).isEqualTo(messenger); |
|
|
|
assertThat(messenger).isEqualTo(messenger); |
|
|
|
boolean condition1 = !messenger.equals(calc); |
|
|
|
assertThat(messenger).isNotEqualTo(calc); |
|
|
|
assertThat(condition1).isTrue(); |
|
|
|
|
|
|
|
assertThat(messenger.hashCode()).isNotEqualTo(calc.hashCode()); |
|
|
|
assertThat(messenger.hashCode()).isNotEqualTo(calc.hashCode()); |
|
|
|
boolean condition = !messenger.toString().equals(calc.toString()); |
|
|
|
assertThat(messenger.toString()).isNotEqualTo(calc.toString()); |
|
|
|
assertThat(condition).isTrue(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String desiredMessage = "Hello World!"; |
|
|
|
String desiredMessage = "Hello World!"; |
|
|
|
assertThat(messenger.getMessage()).as("Message is incorrect").isEqualTo(desiredMessage); |
|
|
|
assertThat(messenger.getMessage()).as("Message is incorrect").isEqualTo(desiredMessage); |
|
|
|
@ -138,8 +130,7 @@ public class GroovyScriptFactoryTests { |
|
|
|
ConfigurableMessenger messenger2 = (ConfigurableMessenger) ctx.getBean("messengerPrototype"); |
|
|
|
ConfigurableMessenger messenger2 = (ConfigurableMessenger) ctx.getBean("messengerPrototype"); |
|
|
|
|
|
|
|
|
|
|
|
assertThat(AopUtils.isAopProxy(messenger)).as("Shouldn't get proxy when refresh is disabled").isFalse(); |
|
|
|
assertThat(AopUtils.isAopProxy(messenger)).as("Shouldn't get proxy when refresh is disabled").isFalse(); |
|
|
|
boolean condition = messenger instanceof Refreshable; |
|
|
|
assertThat(messenger instanceof Refreshable).as("Scripted object should not be instance of Refreshable").isFalse(); |
|
|
|
assertThat(condition).as("Scripted object should not be instance of Refreshable").isFalse(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assertThat(messenger2).isNotSameAs(messenger); |
|
|
|
assertThat(messenger2).isNotSameAs(messenger); |
|
|
|
assertThat(messenger2.getClass()).isSameAs(messenger.getClass()); |
|
|
|
assertThat(messenger2.getClass()).isSameAs(messenger.getClass()); |
|
|
|
@ -158,8 +149,7 @@ public class GroovyScriptFactoryTests { |
|
|
|
ConfigurableMessenger messenger2 = (ConfigurableMessenger) ctx.getBean("messengerPrototype"); |
|
|
|
ConfigurableMessenger messenger2 = (ConfigurableMessenger) ctx.getBean("messengerPrototype"); |
|
|
|
|
|
|
|
|
|
|
|
assertThat(AopUtils.isAopProxy(messenger)).as("Shouldn't get proxy when refresh is disabled").isFalse(); |
|
|
|
assertThat(AopUtils.isAopProxy(messenger)).as("Shouldn't get proxy when refresh is disabled").isFalse(); |
|
|
|
boolean condition = messenger instanceof Refreshable; |
|
|
|
assertThat(messenger instanceof Refreshable).as("Scripted object should not be instance of Refreshable").isFalse(); |
|
|
|
assertThat(condition).as("Scripted object should not be instance of Refreshable").isFalse(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assertThat(messenger2).isNotSameAs(messenger); |
|
|
|
assertThat(messenger2).isNotSameAs(messenger); |
|
|
|
assertThat(messenger2.getClass()).isSameAs(messenger.getClass()); |
|
|
|
assertThat(messenger2.getClass()).isSameAs(messenger.getClass()); |
|
|
|
@ -178,8 +168,7 @@ public class GroovyScriptFactoryTests { |
|
|
|
Messenger messenger = (Messenger) ctx.getBean("messengerInstance"); |
|
|
|
Messenger messenger = (Messenger) ctx.getBean("messengerInstance"); |
|
|
|
|
|
|
|
|
|
|
|
assertThat(AopUtils.isAopProxy(messenger)).as("Shouldn't get proxy when refresh is disabled").isFalse(); |
|
|
|
assertThat(AopUtils.isAopProxy(messenger)).as("Shouldn't get proxy when refresh is disabled").isFalse(); |
|
|
|
boolean condition = messenger instanceof Refreshable; |
|
|
|
assertThat(messenger instanceof Refreshable).as("Scripted object should not be instance of Refreshable").isFalse(); |
|
|
|
assertThat(condition).as("Scripted object should not be instance of Refreshable").isFalse(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String desiredMessage = "Hello World!"; |
|
|
|
String desiredMessage = "Hello World!"; |
|
|
|
assertThat(messenger.getMessage()).as("Message is incorrect").isEqualTo(desiredMessage); |
|
|
|
assertThat(messenger.getMessage()).as("Message is incorrect").isEqualTo(desiredMessage); |
|
|
|
@ -193,8 +182,7 @@ public class GroovyScriptFactoryTests { |
|
|
|
Messenger messenger = (Messenger) ctx.getBean("messengerInstance"); |
|
|
|
Messenger messenger = (Messenger) ctx.getBean("messengerInstance"); |
|
|
|
|
|
|
|
|
|
|
|
assertThat(AopUtils.isAopProxy(messenger)).as("Shouldn't get proxy when refresh is disabled").isFalse(); |
|
|
|
assertThat(AopUtils.isAopProxy(messenger)).as("Shouldn't get proxy when refresh is disabled").isFalse(); |
|
|
|
boolean condition = messenger instanceof Refreshable; |
|
|
|
assertThat(messenger instanceof Refreshable).as("Scripted object should not be instance of Refreshable").isFalse(); |
|
|
|
assertThat(condition).as("Scripted object should not be instance of Refreshable").isFalse(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String desiredMessage = "Hello World!"; |
|
|
|
String desiredMessage = "Hello World!"; |
|
|
|
assertThat(messenger.getMessage()).as("Message is incorrect").isEqualTo(desiredMessage); |
|
|
|
assertThat(messenger.getMessage()).as("Message is incorrect").isEqualTo(desiredMessage); |
|
|
|
@ -208,8 +196,7 @@ public class GroovyScriptFactoryTests { |
|
|
|
Messenger messenger = (Messenger) ctx.getBean("messengerInstanceInline"); |
|
|
|
Messenger messenger = (Messenger) ctx.getBean("messengerInstanceInline"); |
|
|
|
|
|
|
|
|
|
|
|
assertThat(AopUtils.isAopProxy(messenger)).as("Shouldn't get proxy when refresh is disabled").isFalse(); |
|
|
|
assertThat(AopUtils.isAopProxy(messenger)).as("Shouldn't get proxy when refresh is disabled").isFalse(); |
|
|
|
boolean condition = messenger instanceof Refreshable; |
|
|
|
assertThat(messenger instanceof Refreshable).as("Scripted object should not be instance of Refreshable").isFalse(); |
|
|
|
assertThat(condition).as("Scripted object should not be instance of Refreshable").isFalse(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String desiredMessage = "Hello World!"; |
|
|
|
String desiredMessage = "Hello World!"; |
|
|
|
assertThat(messenger.getMessage()).as("Message is incorrect").isEqualTo(desiredMessage); |
|
|
|
assertThat(messenger.getMessage()).as("Message is incorrect").isEqualTo(desiredMessage); |
|
|
|
@ -223,8 +210,7 @@ public class GroovyScriptFactoryTests { |
|
|
|
Messenger messenger = (Messenger) ctx.getBean("messengerInstanceInline"); |
|
|
|
Messenger messenger = (Messenger) ctx.getBean("messengerInstanceInline"); |
|
|
|
|
|
|
|
|
|
|
|
assertThat(AopUtils.isAopProxy(messenger)).as("Shouldn't get proxy when refresh is disabled").isFalse(); |
|
|
|
assertThat(AopUtils.isAopProxy(messenger)).as("Shouldn't get proxy when refresh is disabled").isFalse(); |
|
|
|
boolean condition = messenger instanceof Refreshable; |
|
|
|
assertThat(messenger instanceof Refreshable).as("Scripted object should not be instance of Refreshable").isFalse(); |
|
|
|
assertThat(condition).as("Scripted object should not be instance of Refreshable").isFalse(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String desiredMessage = "Hello World!"; |
|
|
|
String desiredMessage = "Hello World!"; |
|
|
|
assertThat(messenger.getMessage()).as("Message is incorrect").isEqualTo(desiredMessage); |
|
|
|
assertThat(messenger.getMessage()).as("Message is incorrect").isEqualTo(desiredMessage); |
|
|
|
@ -237,8 +223,7 @@ public class GroovyScriptFactoryTests { |
|
|
|
Messenger messenger = (Messenger) ctx.getBean("messenger"); |
|
|
|
Messenger messenger = (Messenger) ctx.getBean("messenger"); |
|
|
|
|
|
|
|
|
|
|
|
assertThat(AopUtils.isAopProxy(messenger)).as("Should be a proxy for refreshable scripts").isTrue(); |
|
|
|
assertThat(AopUtils.isAopProxy(messenger)).as("Should be a proxy for refreshable scripts").isTrue(); |
|
|
|
boolean condition = messenger instanceof Refreshable; |
|
|
|
assertThat(messenger instanceof Refreshable).as("Should be an instance of Refreshable").isTrue(); |
|
|
|
assertThat(condition).as("Should be an instance of Refreshable").isTrue(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String desiredMessage = "Hello World!"; |
|
|
|
String desiredMessage = "Hello World!"; |
|
|
|
assertThat(messenger.getMessage()).as("Message is incorrect").isEqualTo(desiredMessage); |
|
|
|
assertThat(messenger.getMessage()).as("Message is incorrect").isEqualTo(desiredMessage); |
|
|
|
@ -257,8 +242,7 @@ public class GroovyScriptFactoryTests { |
|
|
|
ConfigurableMessenger messenger2 = (ConfigurableMessenger) ctx.getBean("messengerPrototype"); |
|
|
|
ConfigurableMessenger messenger2 = (ConfigurableMessenger) ctx.getBean("messengerPrototype"); |
|
|
|
|
|
|
|
|
|
|
|
assertThat(AopUtils.isAopProxy(messenger)).as("Should be a proxy for refreshable scripts").isTrue(); |
|
|
|
assertThat(AopUtils.isAopProxy(messenger)).as("Should be a proxy for refreshable scripts").isTrue(); |
|
|
|
boolean condition = messenger instanceof Refreshable; |
|
|
|
assertThat(messenger instanceof Refreshable).as("Should be an instance of Refreshable").isTrue(); |
|
|
|
assertThat(condition).as("Should be an instance of Refreshable").isTrue(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assertThat(messenger.getMessage()).isEqualTo("Hello World!"); |
|
|
|
assertThat(messenger.getMessage()).isEqualTo("Hello World!"); |
|
|
|
assertThat(messenger2.getMessage()).isEqualTo("Hello World!"); |
|
|
|
assertThat(messenger2.getMessage()).isEqualTo("Hello World!"); |
|
|
|
@ -371,8 +355,7 @@ public class GroovyScriptFactoryTests { |
|
|
|
CallCounter countingAspect = (CallCounter) ctx.getBean("getMessageAspect"); |
|
|
|
CallCounter countingAspect = (CallCounter) ctx.getBean("getMessageAspect"); |
|
|
|
|
|
|
|
|
|
|
|
assertThat(AopUtils.isAopProxy(messenger)).isTrue(); |
|
|
|
assertThat(AopUtils.isAopProxy(messenger)).isTrue(); |
|
|
|
boolean condition = messenger instanceof Refreshable; |
|
|
|
assertThat(messenger instanceof Refreshable).isFalse(); |
|
|
|
assertThat(condition).isFalse(); |
|
|
|
|
|
|
|
assertThat(countingAspect.getCalls()).isEqualTo(0); |
|
|
|
assertThat(countingAspect.getCalls()).isEqualTo(0); |
|
|
|
assertThat(messenger.getMessage()).isEqualTo("Hello World!"); |
|
|
|
assertThat(messenger.getMessage()).isEqualTo("Hello World!"); |
|
|
|
assertThat(countingAspect.getCalls()).isEqualTo(1); |
|
|
|
assertThat(countingAspect.getCalls()).isEqualTo(1); |
|
|
|
@ -404,8 +387,7 @@ public class GroovyScriptFactoryTests { |
|
|
|
assertThat(ObjectUtils.containsElement(bd.getDependsOn(), "messenger")).isTrue(); |
|
|
|
assertThat(ObjectUtils.containsElement(bd.getDependsOn(), "messenger")).isTrue(); |
|
|
|
Calculator calculator = (Calculator) ctx.getBean("calculator"); |
|
|
|
Calculator calculator = (Calculator) ctx.getBean("calculator"); |
|
|
|
assertThat(calculator).isNotNull(); |
|
|
|
assertThat(calculator).isNotNull(); |
|
|
|
boolean condition = calculator instanceof Refreshable; |
|
|
|
assertThat(calculator instanceof Refreshable).isFalse(); |
|
|
|
assertThat(condition).isFalse(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
@ -417,8 +399,7 @@ public class GroovyScriptFactoryTests { |
|
|
|
CallCounter countingAspect = (CallCounter) ctx.getBean("getMessageAspect"); |
|
|
|
CallCounter countingAspect = (CallCounter) ctx.getBean("getMessageAspect"); |
|
|
|
|
|
|
|
|
|
|
|
assertThat(AopUtils.isAopProxy(messenger)).isTrue(); |
|
|
|
assertThat(AopUtils.isAopProxy(messenger)).isTrue(); |
|
|
|
boolean condition = messenger instanceof Refreshable; |
|
|
|
assertThat(messenger instanceof Refreshable).isTrue(); |
|
|
|
assertThat(condition).isTrue(); |
|
|
|
|
|
|
|
assertThat(countingAspect.getCalls()).isEqualTo(0); |
|
|
|
assertThat(countingAspect.getCalls()).isEqualTo(0); |
|
|
|
assertThat(messenger.getMessage()).isEqualTo("Hello World!"); |
|
|
|
assertThat(messenger.getMessage()).isEqualTo("Hello World!"); |
|
|
|
assertThat(countingAspect.getCalls()).isEqualTo(1); |
|
|
|
assertThat(countingAspect.getCalls()).isEqualTo(1); |
|
|
|
@ -435,8 +416,7 @@ public class GroovyScriptFactoryTests { |
|
|
|
Messenger messenger = (Messenger) ctx.getBean("refreshableMessenger"); |
|
|
|
Messenger messenger = (Messenger) ctx.getBean("refreshableMessenger"); |
|
|
|
|
|
|
|
|
|
|
|
assertThat(AopUtils.isAopProxy(messenger)).isTrue(); |
|
|
|
assertThat(AopUtils.isAopProxy(messenger)).isTrue(); |
|
|
|
boolean condition = messenger instanceof Refreshable; |
|
|
|
assertThat(messenger instanceof Refreshable).isTrue(); |
|
|
|
assertThat(condition).isTrue(); |
|
|
|
|
|
|
|
assertThat(messenger.getMessage()).isEqualTo("Hello World!"); |
|
|
|
assertThat(messenger.getMessage()).isEqualTo("Hello World!"); |
|
|
|
|
|
|
|
|
|
|
|
assertThat(ctx.getBeansOfType(ConcreteMessenger.class)).containsValue((ConcreteMessenger) messenger); |
|
|
|
assertThat(ctx.getBeansOfType(ConcreteMessenger.class)).containsValue((ConcreteMessenger) messenger); |
|
|
|
@ -487,8 +467,7 @@ public class GroovyScriptFactoryTests { |
|
|
|
assertThat(Arrays.asList(ctx.getBeanNamesForType(Messenger.class))).contains("refreshableMessenger"); |
|
|
|
assertThat(Arrays.asList(ctx.getBeanNamesForType(Messenger.class))).contains("refreshableMessenger"); |
|
|
|
Messenger messenger = (Messenger) ctx.getBean("refreshableMessenger"); |
|
|
|
Messenger messenger = (Messenger) ctx.getBean("refreshableMessenger"); |
|
|
|
assertThat(AopUtils.isAopProxy(messenger)).isTrue(); |
|
|
|
assertThat(AopUtils.isAopProxy(messenger)).isTrue(); |
|
|
|
boolean condition = messenger instanceof Refreshable; |
|
|
|
assertThat(messenger instanceof Refreshable).isTrue(); |
|
|
|
assertThat(condition).isTrue(); |
|
|
|
|
|
|
|
assertThat(messenger.getMessage()).isEqualTo("Hello World!"); |
|
|
|
assertThat(messenger.getMessage()).isEqualTo("Hello World!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -542,8 +521,8 @@ public class GroovyScriptFactoryTests { |
|
|
|
// expect the exception we threw in the custom metaclass to show it got invoked
|
|
|
|
// expect the exception we threw in the custom metaclass to show it got invoked
|
|
|
|
ApplicationContext ctx = new ClassPathXmlApplicationContext(xmlFile); |
|
|
|
ApplicationContext ctx = new ClassPathXmlApplicationContext(xmlFile); |
|
|
|
Calculator calc = (Calculator) ctx.getBean("delegatingCalculator"); |
|
|
|
Calculator calc = (Calculator) ctx.getBean("delegatingCalculator"); |
|
|
|
assertThatIllegalStateException().isThrownBy(() -> |
|
|
|
assertThatIllegalStateException() |
|
|
|
calc.add(1, 2)) |
|
|
|
.isThrownBy(() -> calc.add(1, 2)) |
|
|
|
.withMessage("Gotcha"); |
|
|
|
.withMessage("Gotcha"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -551,11 +530,8 @@ public class GroovyScriptFactoryTests { |
|
|
|
void testFactoryBean() { |
|
|
|
void testFactoryBean() { |
|
|
|
ApplicationContext context = new ClassPathXmlApplicationContext("groovyContext.xml", getClass()); |
|
|
|
ApplicationContext context = new ClassPathXmlApplicationContext("groovyContext.xml", getClass()); |
|
|
|
Object factory = context.getBean("&factory"); |
|
|
|
Object factory = context.getBean("&factory"); |
|
|
|
boolean condition1 = factory instanceof FactoryBean; |
|
|
|
assertThat(factory instanceof FactoryBean).isTrue(); |
|
|
|
assertThat(condition1).isTrue(); |
|
|
|
|
|
|
|
Object result = context.getBean("factory"); |
|
|
|
Object result = context.getBean("factory"); |
|
|
|
boolean condition = result instanceof String; |
|
|
|
|
|
|
|
assertThat(condition).isTrue(); |
|
|
|
|
|
|
|
assertThat(result).isEqualTo("test"); |
|
|
|
assertThat(result).isEqualTo("test"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -563,11 +539,8 @@ public class GroovyScriptFactoryTests { |
|
|
|
void testRefreshableFactoryBean() { |
|
|
|
void testRefreshableFactoryBean() { |
|
|
|
ApplicationContext context = new ClassPathXmlApplicationContext("groovyContext.xml", getClass()); |
|
|
|
ApplicationContext context = new ClassPathXmlApplicationContext("groovyContext.xml", getClass()); |
|
|
|
Object factory = context.getBean("&refreshableFactory"); |
|
|
|
Object factory = context.getBean("&refreshableFactory"); |
|
|
|
boolean condition1 = factory instanceof FactoryBean; |
|
|
|
assertThat(factory instanceof FactoryBean).isTrue(); |
|
|
|
assertThat(condition1).isTrue(); |
|
|
|
|
|
|
|
Object result = context.getBean("refreshableFactory"); |
|
|
|
Object result = context.getBean("refreshableFactory"); |
|
|
|
boolean condition = result instanceof String; |
|
|
|
|
|
|
|
assertThat(condition).isTrue(); |
|
|
|
|
|
|
|
assertThat(result).isEqualTo("test"); |
|
|
|
assertThat(result).isEqualTo("test"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|