From b5fbdff6d4c84c5fbc26adc5a07170fc7ba5acf4 Mon Sep 17 00:00:00 2001 From: Lukasz Jarocki Date: Wed, 13 Oct 2021 13:18:08 +0200 Subject: SONAR-15487 added unit test for quickFixAvailable added in Issue and DefaultIssue --- .../test/java/org/sonar/core/issue/DefaultIssueTest.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'sonar-core') diff --git a/sonar-core/src/test/java/org/sonar/core/issue/DefaultIssueTest.java b/sonar-core/src/test/java/org/sonar/core/issue/DefaultIssueTest.java index c706525c035..f147fd6fbbb 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/DefaultIssueTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/DefaultIssueTest.java @@ -221,4 +221,17 @@ public class DefaultIssueTest { assertThat(issue.changes()).isEmpty(); } + + @Test + public void isQuickFixAvailable_givenQuickFixAvailable_returnTrue() { + DefaultIssue defaultIssue = new DefaultIssue(); + + defaultIssue.setQuickFixAvailable(true); + + assertThat(defaultIssue.isQuickFixAvailable()).isTrue(); + + defaultIssue.setQuickFixAvailable(false); + + assertThat(defaultIssue.isQuickFixAvailable()).isFalse(); + } } -- cgit v1.2.3