From 30b3456935e069ae51179ea33ea6b57f42bf1d46 Mon Sep 17 00:00:00 2001 From: Zipeng WU Date: Thu, 24 Feb 2022 17:40:25 +0100 Subject: SONAR-16064 new API in SensorContext to indicate possibility to skip unchanged files --- .../sonar/api/batch/sensor/internal/SensorContextTesterTest.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sonar-plugin-api-impl/src/test/java') diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/internal/SensorContextTesterTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/internal/SensorContextTesterTest.java index 6d30694829b..eb61b3a55d4 100644 --- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/internal/SensorContextTesterTest.java +++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/internal/SensorContextTesterTest.java @@ -74,6 +74,13 @@ public class SensorContextTesterTest { assertThat(tester.config().get("foo")).contains("bar"); } + @Test + public void test_canSkipUnchangedFiles() { + assertThat(tester.canSkipUnchangedFiles()).isFalse(); + tester.setCanSkipUnchangedFiles(true); + assertThat(tester.canSkipUnchangedFiles()).isTrue(); + } + @Test public void testActiveRules() { NewActiveRule activeRule = new NewActiveRule.Builder() -- cgit v1.2.3