Skip to content

Commit 2249e84

Browse files
CristianAmbrosinisonartech
authored and
sonartech
committed
NET-781 Move sensor test files into subfolder
1 parent d904f76 commit 2249e84

8 files changed

+31
-17
lines changed

sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/AbstractFileCacheSensorTest.java sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/sensors/AbstractFileCacheSensorTest.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* You should have received a copy of the Sonar Source-Available License
1515
* along with this program; if not, see https://sonarsource.com/license/ssal/
1616
*/
17-
package org.sonarsource.dotnet.shared.plugins;
17+
package org.sonarsource.dotnet.shared.plugins.sensors;
1818

1919
import java.io.File;
2020
import java.io.IOException;
@@ -32,7 +32,8 @@
3232
import org.sonar.api.batch.sensor.internal.SensorContextTester;
3333
import org.sonar.api.config.internal.MapSettings;
3434
import org.sonar.api.testfixtures.log.LogTester;
35-
import org.sonarsource.dotnet.shared.plugins.sensors.AbstractFileCacheSensor;
35+
import org.sonarsource.dotnet.shared.plugins.HashProvider;
36+
import org.sonarsource.dotnet.shared.plugins.PluginMetadata;
3637

3738
import static org.assertj.core.api.Assertions.assertThat;
3839
import static org.mockito.ArgumentMatchers.any;

sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/AnalysisWarningsSensorTest.java sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/sensors/AnalysisWarningsSensorTest.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* You should have received a copy of the Sonar Source-Available License
1515
* along with this program; if not, see https://sonarsource.com/license/ssal/
1616
*/
17-
package org.sonarsource.dotnet.shared.plugins;
17+
package org.sonarsource.dotnet.shared.plugins.sensors;
1818

1919
import java.io.File;
2020
import java.io.IOException;
@@ -33,7 +33,6 @@
3333
import org.sonar.api.notifications.AnalysisWarnings;
3434
import org.sonar.api.testfixtures.log.LogTester;
3535
import org.slf4j.event.Level;
36-
import org.sonarsource.dotnet.shared.plugins.sensors.AnalysisWarningsSensor;
3736

3837
import static org.assertj.core.api.Assertions.assertThat;
3938
import static org.mockito.Mockito.anyString;

sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/DotNetSensorTest.java sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/sensors/DotNetSensorTest.java

+8-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* You should have received a copy of the Sonar Source-Available License
1515
* along with this program; if not, see https://sonarsource.com/license/ssal/
1616
*/
17-
package org.sonarsource.dotnet.shared.plugins;
17+
package org.sonarsource.dotnet.shared.plugins.sensors;
1818

1919
import java.io.File;
2020
import java.nio.file.Path;
@@ -41,7 +41,13 @@
4141
import org.sonar.api.rule.RuleKey;
4242
import org.sonar.api.scanner.sensor.ProjectSensor;
4343
import org.sonar.api.testfixtures.log.LogTester;
44-
import org.sonarsource.dotnet.shared.plugins.sensors.DotNetSensor;
44+
import org.sonarsource.dotnet.shared.plugins.PluginMetadata;
45+
import org.sonarsource.dotnet.shared.plugins.ProjectTypeCollector;
46+
import org.sonarsource.dotnet.shared.plugins.ProtobufDataImporter;
47+
import org.sonarsource.dotnet.shared.plugins.RealPathProvider;
48+
import org.sonarsource.dotnet.shared.plugins.ReportPathCollector;
49+
import org.sonarsource.dotnet.shared.plugins.RoslynDataImporter;
50+
import org.sonarsource.dotnet.shared.plugins.RoslynReport;
4551

4652
import static org.assertj.core.api.Assertions.assertThat;
4753
import static org.mockito.ArgumentMatchers.any;

sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/FileTypeSensorTest.java sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/sensors/FileTypeSensorTest.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* You should have received a copy of the Sonar Source-Available License
1515
* along with this program; if not, see https://sonarsource.com/license/ssal/
1616
*/
17-
package org.sonarsource.dotnet.shared.plugins;
17+
package org.sonarsource.dotnet.shared.plugins.sensors;
1818

1919
import java.io.File;
2020
import org.junit.Before;
@@ -30,7 +30,8 @@
3030
import org.sonar.api.batch.sensor.internal.SensorContextTester;
3131
import org.sonar.api.config.internal.MapSettings;
3232
import org.sonar.api.testfixtures.log.LogTester;
33-
import org.sonarsource.dotnet.shared.plugins.sensors.FileTypeSensor;
33+
import org.sonarsource.dotnet.shared.plugins.PluginMetadata;
34+
import org.sonarsource.dotnet.shared.plugins.ProjectTypeCollector;
3435

3536
import static org.assertj.core.api.Assertions.assertThat;
3637
import static org.mockito.Mockito.mock;

sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/LogSensorTest.java sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/sensors/LogSensorTest.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* You should have received a copy of the Sonar Source-Available License
1515
* along with this program; if not, see https://sonarsource.com/license/ssal/
1616
*/
17-
package org.sonarsource.dotnet.shared.plugins;
17+
package org.sonarsource.dotnet.shared.plugins.sensors;
1818

1919
import java.io.File;
2020
import java.util.Collections;
@@ -26,7 +26,8 @@
2626
import org.sonar.api.batch.sensor.internal.DefaultSensorDescriptor;
2727
import org.sonar.api.batch.sensor.internal.SensorContextTester;
2828
import org.sonar.api.testfixtures.log.LogTester;
29-
import org.sonarsource.dotnet.shared.plugins.sensors.LogSensor;
29+
import org.sonarsource.dotnet.shared.plugins.ModuleConfiguration;
30+
import org.sonarsource.dotnet.shared.plugins.PluginMetadata;
3031

3132
import static org.assertj.core.api.Assertions.assertThat;
3233
import static org.mockito.Mockito.mock;
@@ -48,7 +49,7 @@ public class LogSensorTest {
4849
private LogSensor sensor;
4950

5051
@Before
51-
public void prepare() throws Exception {
52+
public void prepare() {
5253
logTester.setLevel(Level.DEBUG);
5354
context = SensorContextTester.create(temp.getRoot());
5455
PluginMetadata metadata = mock(PluginMetadata.class);

sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/PropertiesSensorTest.java sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/sensors/PropertiesSensorTest.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,18 @@
1414
* You should have received a copy of the Sonar Source-Available License
1515
* along with this program; if not, see https://sonarsource.com/license/ssal/
1616
*/
17-
package org.sonarsource.dotnet.shared.plugins;
17+
package org.sonarsource.dotnet.shared.plugins.sensors;
1818

1919
import java.nio.file.Path;
2020
import java.nio.file.Paths;
2121
import java.util.Collections;
2222
import org.junit.Test;
2323
import org.sonar.api.batch.sensor.SensorContext;
2424
import org.sonar.api.batch.sensor.SensorDescriptor;
25-
import org.sonarsource.dotnet.shared.plugins.sensors.PropertiesSensor;
25+
import org.sonarsource.dotnet.shared.plugins.ModuleConfiguration;
26+
import org.sonarsource.dotnet.shared.plugins.PluginMetadata;
27+
import org.sonarsource.dotnet.shared.plugins.ReportPathCollector;
28+
import org.sonarsource.dotnet.shared.plugins.RoslynReport;
2629

2730
import static org.mockito.ArgumentMatchers.any;
2831
import static org.mockito.ArgumentMatchers.anyString;

sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/TelemetryProcessorTest.java sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/sensors/TelemetryProcessorTest.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* You should have received a copy of the Sonar Source-Available License
1515
* along with this program; if not, see https://sonarsource.com/license/ssal/
1616
*/
17-
package org.sonarsource.dotnet.shared.plugins;
17+
package org.sonarsource.dotnet.shared.plugins.sensors;
1818

1919
import java.util.ArrayList;
2020
import org.apache.commons.lang3.tuple.Pair;
@@ -28,7 +28,8 @@
2828
import org.sonar.api.batch.sensor.internal.SensorContextTester;
2929
import org.sonar.api.testfixtures.log.LogTester;
3030
import org.sonarsource.dotnet.protobuf.SonarAnalyzer;
31-
import org.sonarsource.dotnet.shared.plugins.sensors.TelemetryProcessor;
31+
import org.sonarsource.dotnet.shared.plugins.PluginMetadata;
32+
import org.sonarsource.dotnet.shared.plugins.TelemetryCollector;
3233

3334
import static org.assertj.core.api.Assertions.assertThat;
3435
import static org.mockito.ArgumentMatchers.anyString;

sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/TelemetrySensorTest.java sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/sensors/TelemetrySensorTest.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* You should have received a copy of the Sonar Source-Available License
1515
* along with this program; if not, see https://sonarsource.com/license/ssal/
1616
*/
17-
package org.sonarsource.dotnet.shared.plugins;
17+
package org.sonarsource.dotnet.shared.plugins.sensors;
1818

1919
import java.io.File;
2020
import java.util.Arrays;
@@ -26,7 +26,9 @@
2626
import org.sonar.api.batch.sensor.internal.DefaultSensorDescriptor;
2727
import org.sonar.api.batch.sensor.internal.SensorContextTester;
2828
import org.sonar.api.testfixtures.log.LogTester;
29-
import org.sonarsource.dotnet.shared.plugins.sensors.TelemetrySensor;
29+
import org.sonarsource.dotnet.shared.plugins.ModuleConfiguration;
30+
import org.sonarsource.dotnet.shared.plugins.PluginMetadata;
31+
import org.sonarsource.dotnet.shared.plugins.TelemetryCollector;
3032

3133
import static org.assertj.core.api.Assertions.assertThat;
3234
import static org.mockito.Mockito.mock;

0 commit comments

Comments
 (0)