StubConfigurationAccess implements ConfigurationAccessBase { public void setProperties() { String templatePath = propertyHolder.get("stub.template.path"); String conditionCheckerPath = propertyHolder.get("stub.condition.checker.path"); String responseFormatterPath = propertyHolder.get("stub.response.formatter.path"); String interceptorPath = propertyHolder.get("stub.interceptor.path"); String jarPath = propertyHolder.get("stub.jar.path"); String cachePath = propertyHolder.get("stub.descriptors.cache.path"); String sequenceHandlerPath = propertyHolder.get("stub.sequence.handler.path"); stubResourcePathProvider.setTemplatesPath(templatePath); stubResourcePathProvider.setConditionCheckerPath(conditionCheckerPath); stubResourcePathProvider.setResponseFormatterPath(responseFormatterPath); stubResourcePathProvider.setInterceptorPath(interceptorPath); stubResourcePathProvider.setJarPath(jarPath); stubResourcePathProvider.setCachePath(cachePath); stubResourcePathProvider.setSequenceHandlerPath(sequenceHandlerPath); classNameMapper.initialize(stubResourcePathProvider.getEveryPathAsString()); }  @Override void loadProperties(); PropertyDto getProperties(); void setProperties();  }
@Test public void testOnApplicationEventShouldSetTemplatesPath() { String templatePath = "templatePath"; given(propertyHolder.get("stub.template.path")).willReturn(templatePath); underTest.setProperties(); verify(stubResourcePathProvider).setTemplatesPath(templatePath); }
@Test public void testOnApplicationEventShouldSetResponseFormatterPath() { String responseFormatterPath = "responseFormatterPath"; given(propertyHolder.get("stub.response.formatter.path")).willReturn(responseFormatterPath); underTest.setProperties(); verify(stubResourcePathProvider).setResponseFormatterPath(responseFormatterPath); }
@Test public void testOnApplicationEventShouldSetConditionCheckerPath() { String conditionCheckerPath = "conditionCheckerPath"; given(propertyHolder.get("stub.condition.checker.path")).willReturn(conditionCheckerPath); underTest.setProperties(); verify(stubResourcePathProvider).setConditionCheckerPath(conditionCheckerPath); }
@Test public void testOnApplicationEventShouldSetInterceptorPath() { String interceptorPath = "interceptorPath"; given(propertyHolder.get("stub.interceptor.path")).willReturn(interceptorPath); underTest.setProperties(); verify(stubResourcePathProvider).setInterceptorPath(interceptorPath); }
@Test public void testOnApplicationEventShouldSetJarPath() { String jarPath = "jarPath"; given(propertyHolder.get("stub.jar.path")).willReturn(jarPath); underTest.setProperties(); verify(stubResourcePathProvider).setJarPath(jarPath); }
@Test public void testOnApplicationEventShouldSetSequenceHandlerPath() { String sequenceHandlerPath = "sequenceHandlerPath"; given(propertyHolder.get("stub.sequence.handler.path")).willReturn(sequenceHandlerPath); underTest.setProperties(); verify(stubResourcePathProvider).setSequenceHandlerPath(sequenceHandlerPath); }
@Test public void testOnApplicationEventShouldInitializeClassNameMapper() { underTest.setProperties(); verify(classNameMapper).initialize(new ArrayList<>()); }