MessageInterpolatorFactoryTests Class — spring-boot Architecture
Architecture documentation for the MessageInterpolatorFactoryTests class in MessageInterpolatorFactoryTests.java from the spring-boot codebase.
Entity Profile
Source Code
core/spring-boot/src/test/java/org/springframework/boot/validation/MessageInterpolatorFactoryTests.java lines 34–53
class MessageInterpolatorFactoryTests {
@Test
void getObjectShouldReturnResourceBundleMessageInterpolator() {
MessageInterpolator interpolator = new MessageInterpolatorFactory().getObject();
assertThat(interpolator).isInstanceOf(ResourceBundleMessageInterpolator.class);
}
@Test
void getObjectShouldReturnMessageSourceMessageInterpolatorDelegateWithResourceBundleMessageInterpolator() {
MessageSource messageSource = mock(MessageSource.class);
MessageInterpolatorFactory interpolatorFactory = new MessageInterpolatorFactory(messageSource);
MessageInterpolator interpolator = interpolatorFactory.getObject();
assertThat(interpolator).isInstanceOf(MessageSourceMessageInterpolator.class);
assertThat(interpolator).hasFieldOrPropertyWithValue("messageSource", messageSource);
assertThat(ReflectionTestUtils.getField(interpolator, "messageInterpolator"))
.isInstanceOf(ResourceBundleMessageInterpolator.class);
}
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free