Search in sources :

Example 26 with LiveIssue

use of org.sonarlint.intellij.issue.LiveIssue in project sonarlint-intellij by SonarSource.

the class LiveIssueCacheTest method should_not_fallback_persistence.

@Test
public void should_not_fallback_persistence() throws IOException {
    VirtualFile file = createTestFile("file1");
    LiveIssue issue1 = createTestIssue("r1");
    cache.save(file, Collections.singleton(issue1));
    VirtualFile cacheMiss = createTestFile("file2");
    assertThat(cache.getLive(cacheMiss)).isNull();
    verifyZeroInteractions(store);
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) LiveIssue(org.sonarlint.intellij.issue.LiveIssue) Test(org.junit.Test)

Aggregations

LiveIssue (org.sonarlint.intellij.issue.LiveIssue)26 Test (org.junit.Test)15 VirtualFile (com.intellij.openapi.vfs.VirtualFile)11 RangeMarker (com.intellij.openapi.editor.RangeMarker)4 PsiFile (com.intellij.psi.PsiFile)4 CheckinHandler (com.intellij.openapi.vcs.checkin.CheckinHandler)3 AnalysisCallback (org.sonarlint.intellij.analysis.AnalysisCallback)3 IssueNode (org.sonarlint.intellij.ui.nodes.IssueNode)3 ApplicationManager (com.intellij.openapi.application.ApplicationManager)2 Project (com.intellij.openapi.project.Project)2 TextRange (com.intellij.openapi.util.TextRange)2 UIUtil (com.intellij.util.ui.UIUtil)2 IOException (java.io.IOException)2 Collection (java.util.Collection)2 SonarTest (org.sonarlint.intellij.SonarTest)2 IssueManager (org.sonarlint.intellij.issue.IssueManager)2 SonarLintUtils (org.sonarlint.intellij.util.SonarLintUtils)2 Issue (org.sonarsource.sonarlint.core.client.api.common.analysis.Issue)2 InspectionDescriptionLinkHandler (com.intellij.codeInsight.hint.InspectionDescriptionLinkHandler)1 ProblemHighlightType (com.intellij.codeInspection.ProblemHighlightType)1