Search in sources :

Example 1 with IssueListener

use of org.sonarsource.sonarlint.core.client.api.common.analysis.IssueListener in project sonarlint-intellij by SonarSource.

the class SonarLintAnalyzerTest method testAnalysis.

@Test
public void testAnalysis() {
    VirtualFile file = mock(VirtualFile.class);
    when(file.getPath()).thenReturn("project/testFile");
    IssueListener listener = mock(IssueListener.class);
    when(app.getDefaultModalityState()).thenReturn(ModalityState.NON_MODAL);
    analyzer.analyzeModule(module, Collections.singleton(file), listener, mock(ProgressMonitor.class));
    verify(facade).startAnalysis(anyList(), eq(listener), eq(Collections.emptyMap()), any(ProgressMonitor.class));
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) ProgressMonitor(org.sonarsource.sonarlint.core.client.api.common.ProgressMonitor) IssueListener(org.sonarsource.sonarlint.core.client.api.common.analysis.IssueListener) SonarTest(org.sonarlint.intellij.SonarTest) Test(org.junit.Test)

Aggregations

VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 Test (org.junit.Test)1 SonarTest (org.sonarlint.intellij.SonarTest)1 ProgressMonitor (org.sonarsource.sonarlint.core.client.api.common.ProgressMonitor)1 IssueListener (org.sonarsource.sonarlint.core.client.api.common.analysis.IssueListener)1