use of org.infernus.idea.checkstyle.service.CheckstyleActionsImpl in project checkstyle-idea by jshiell.
the class OpLoadConfigurationTest method testLoadFromString.
@Test
public void testLoadFromString() throws IOException, URISyntaxException {
CheckstyleProjectService projectService = mock(CheckstyleProjectService.class);
when(projectService.underlyingClassLoader()).thenReturn(getClass().getClassLoader());
final String configXml = FileUtil.readFile("cmd/config-ok.xml");
CheckstyleInternalObject csConfig = new CheckstyleActionsImpl(PROJECT, projectService).loadConfiguration(configXml);
Assert.assertNotNull(csConfig);
}
use of org.infernus.idea.checkstyle.service.CheckstyleActionsImpl in project checkstyle-idea by jshiell.
the class OpLoadConfigurationTest method testLoadBundledGoogleChecks.
@Test
public void testLoadBundledGoogleChecks() {
final ConfigurationLocationFactory clf = new ConfigurationLocationFactory();
CheckstyleProjectService projectService = mock(CheckstyleProjectService.class);
when(projectService.underlyingClassLoader()).thenReturn(getClass().getClassLoader());
CheckstyleInternalObject csConfig = new CheckstyleActionsImpl(PROJECT, projectService).loadConfiguration(clf.create(BundledConfig.GOOGLE_CHECKS, mock(Project.class)), true, null);
Assert.assertNotNull(csConfig);
}
Aggregations