Search in sources :

Example 1 with StringConfigurationLocation

use of org.infernus.idea.checkstyle.service.StringConfigurationLocation in project checkstyle-idea by jshiell.

the class OpCreateCheckerTest method testCreateCheckerWithConfigsMock.

@Test
public void testCreateCheckerWithConfigsMock() throws IOException, URISyntaxException {
    final ConfigurationLocation configLoc = new StringConfigurationLocation(FileUtil.readFile("cmd/" + CONFIG_FILE), mock(Project.class));
    final CheckStyleChecker checker = new CheckstyleActionsImpl(PROJECT, checkstyleProjectServiceMock).createChecker(moduleMock, configLoc, emptyMap(), configurationsMock, getClass().getClassLoader());
    assertNotNull(checker);
}
Also used : CheckstyleActionsImpl(org.infernus.idea.checkstyle.service.CheckstyleActionsImpl) Project(com.intellij.openapi.project.Project) CheckStyleChecker(org.infernus.idea.checkstyle.checker.CheckStyleChecker) ConfigurationLocation(org.infernus.idea.checkstyle.model.ConfigurationLocation) StringConfigurationLocation(org.infernus.idea.checkstyle.service.StringConfigurationLocation) StringConfigurationLocation(org.infernus.idea.checkstyle.service.StringConfigurationLocation) Test(org.junit.Test)

Example 2 with StringConfigurationLocation

use of org.infernus.idea.checkstyle.service.StringConfigurationLocation in project checkstyle-idea by jshiell.

the class OpCreateCheckerTest method testCreateChecker_noModule.

@Test
public void testCreateChecker_noModule() throws IOException, URISyntaxException {
    final ConfigurationLocation configLoc = new StringConfigurationLocation(FileUtil.readFile("cmd/" + CONFIG_FILE), mock(Project.class));
    // noinspection ConstantConditions
    CheckStyleChecker checker = new CheckstyleActionsImpl(PROJECT, checkstyleProjectServiceMock).createChecker(null, configLoc, emptyMap(), configurationsMock, getClass().getClassLoader());
    assertNotNull(checker);
}
Also used : CheckstyleActionsImpl(org.infernus.idea.checkstyle.service.CheckstyleActionsImpl) Project(com.intellij.openapi.project.Project) CheckStyleChecker(org.infernus.idea.checkstyle.checker.CheckStyleChecker) ConfigurationLocation(org.infernus.idea.checkstyle.model.ConfigurationLocation) StringConfigurationLocation(org.infernus.idea.checkstyle.service.StringConfigurationLocation) StringConfigurationLocation(org.infernus.idea.checkstyle.service.StringConfigurationLocation) Test(org.junit.Test)

Aggregations

Project (com.intellij.openapi.project.Project)2 CheckStyleChecker (org.infernus.idea.checkstyle.checker.CheckStyleChecker)2 ConfigurationLocation (org.infernus.idea.checkstyle.model.ConfigurationLocation)2 CheckstyleActionsImpl (org.infernus.idea.checkstyle.service.CheckstyleActionsImpl)2 StringConfigurationLocation (org.infernus.idea.checkstyle.service.StringConfigurationLocation)2 Test (org.junit.Test)2