From 6c0ae292c9d12eaa61b1507831eb9905ea2c6c40 Mon Sep 17 00:00:00 2001 From: Evgeny Mandrikov Date: Wed, 19 Oct 2011 20:32:57 +0400 Subject: SONAR-2594 Fix tests --- .../test/java/org/sonar/plugins/findbugs/FindbugsExecutorTest.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins/sonar-findbugs-plugin') diff --git a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsExecutorTest.java b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsExecutorTest.java index 812f5180b8e..5930f711dea 100644 --- a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsExecutorTest.java +++ b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsExecutorTest.java @@ -26,7 +26,9 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import java.io.File; +import java.util.Locale; +import org.apache.commons.configuration.BaseConfiguration; import org.apache.commons.io.FileUtils; import org.junit.Test; import org.sonar.api.CoreProperties; @@ -64,6 +66,7 @@ public class FindbugsExecutorTest { Project project = mock(Project.class); ProjectFileSystem fs = mock(ProjectFileSystem.class); when(project.getFileSystem()).thenReturn(fs); + when(project.getConfiguration()).thenReturn(new BaseConfiguration()); FindbugsConfiguration conf = new FindbugsConfiguration(project, null, null, null); new FindbugsExecutor(conf).execute(); @@ -80,6 +83,7 @@ public class FindbugsExecutorTest { when(conf.saveIncludeConfigXml()).thenReturn(new File("test-resources/findbugs-include.xml")); when(conf.getEffort()).thenReturn("default"); when(conf.getTimeout()).thenReturn(CoreProperties.FINDBUGS_TIMEOUT_DEFAULT_VALUE); + when(conf.getLocale()).thenReturn(Locale.ENGLISH); return conf; } -- cgit v1.2.3