Reduce warning messages in unit tests.

We get a warning on any attempt to use anything that may be affected by DeveloperSettings, because DeveloperSetting tries to use ConfigurationProperties to find its properties file. We could avoid this by requiring the use of a ConfigurationPropertiesStub, but it seems to make more sense to routinely create a DeveloperSettingsStub on each ServletContextStub.
This commit is contained in:
j2blake 2013-11-25 12:31:51 -05:00
parent 0b43a44097
commit 70298026ea
3 changed files with 42 additions and 2 deletions

View file

@ -179,7 +179,7 @@ public class DeveloperSettings {
// The factory
// ----------------------------------------------------------------------
private static final String ATTRIBUTE_NAME = DeveloperSettings.class
protected static final String ATTRIBUTE_NAME = DeveloperSettings.class
.getName();
public static DeveloperSettings getBean(HttpServletRequest req) {
@ -203,7 +203,7 @@ public class DeveloperSettings {
private final Map<Keys, Object> settings = new EnumMap<>(Keys.class);
private DeveloperSettings(ServletContext ctx) {
protected DeveloperSettings(ServletContext ctx) {
updateFromFile(ctx);
}