use of org.infernus.idea.checkstyle.ui.CheckStyleConfigPanel in project checkstyle-idea by jshiell.
the class CheckStyleConfigurableTest method buildMockPanel.
private CheckStyleConfigPanel buildMockPanel(final Project mockProject) {
CheckStyleConfigPanel mockPanel = mock(CheckStyleConfigPanel.class);
final SortedSet<ConfigurationLocation> mockLocations = buildMockLocations(mockProject, new ConfigurationLocationFactory());
final PluginConfiguration mockConfigDto = PluginConfigurationBuilder.testInstance("7.1.2").withLocations(mockLocations).withThirdPartyClassPath(Arrays.asList("cp1", "cp2")).withActiveLocation(mockLocations.first()).build();
when(mockPanel.getPluginConfiguration()).thenReturn(mockConfigDto);
return mockPanel;
}
use of org.infernus.idea.checkstyle.ui.CheckStyleConfigPanel in project checkstyle-idea by jshiell.
the class CheckStyleConfigurableTest method testIsModified.
@Test
public void testIsModified() {
Project mockProject = mock(Project.class);
CheckStyleConfigPanel mockPanel = buildMockPanel(mockProject);
CheckStyleConfigurable classUnderTest = new CheckStyleConfigurable(mockProject, mockPanel, mock(CheckstyleProjectService.class), mockPluginConfigurationManager(mockProject));
assertFalse(classUnderTest.isModified());
}
Aggregations