diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2019-06-05 11:01:49 -0500 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-07-12 20:21:14 +0200 |
commit | 97e15208790028ed50187e58cd4580e6cef8e6b3 (patch) | |
tree | b6232897a8e69eb219b0479599b29962a804338b /sonar-core/src/test | |
parent | e020f1425d815ae48e9b5c39bc0eaf92382c3c06 (diff) | |
download | sonarqube-97e15208790028ed50187e58cd4580e6cef8e6b3.tar.gz sonarqube-97e15208790028ed50187e58cd4580e6cef8e6b3.zip |
Extract implementation from plugin API - Scanner FS
Diffstat (limited to 'sonar-core/src/test')
-rw-r--r-- | sonar-core/src/test/java/org/sonar/core/component/ComponentKeysTest.java | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/sonar-core/src/test/java/org/sonar/core/component/ComponentKeysTest.java b/sonar-core/src/test/java/org/sonar/core/component/ComponentKeysTest.java index 5187d09bd24..e476adcab74 100644 --- a/sonar-core/src/test/java/org/sonar/core/component/ComponentKeysTest.java +++ b/sonar-core/src/test/java/org/sonar/core/component/ComponentKeysTest.java @@ -22,24 +22,14 @@ package org.sonar.core.component; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.api.batch.fs.internal.DefaultInputFile; import static org.assertj.core.api.Assertions.assertThat; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; public class ComponentKeysTest { @Rule public ExpectedException expectedException = ExpectedException.none(); @Test - public void create_effective_key() { - DefaultInputFile file = mock(DefaultInputFile.class); - when(file.getProjectRelativePath()).thenReturn("foo/Bar.php"); - assertThat(ComponentKeys.createEffectiveKey("my_project", file)).isEqualTo("my_project:foo/Bar.php"); - } - - @Test public void create_key_from_module_key_path_and_branch() { assertThat(ComponentKeys.createKey("module_key", "file", "origin/master")).isEqualTo("module_key:origin/master:file"); assertThat(ComponentKeys.createKey("module_key", "file", null)).isEqualTo("module_key:file"); |