diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2021-06-09 16:26:56 -0500 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2021-06-17 20:03:08 +0000 |
commit | 2754feca4e5fa8fdd804c827783250f48676296c (patch) | |
tree | 1ed9522bbc9eff9444fae6bf0a951d976da2b859 /sonar-plugin-api/src/main/java/org/sonar/api/test | |
parent | 97f2c01fdd4ae863134d4aa1bf32b7dcd512b10c (diff) | |
download | sonarqube-2754feca4e5fa8fdd804c827783250f48676296c.tar.gz sonarqube-2754feca4e5fa8fdd804c827783250f48676296c.zip |
SONAR-14925 Remove code deprecated before 7.0 in the Plugin API
Diffstat (limited to 'sonar-plugin-api/src/main/java/org/sonar/api/test')
12 files changed, 0 insertions, 455 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/test/CoverageBlock.java b/sonar-plugin-api/src/main/java/org/sonar/api/test/CoverageBlock.java deleted file mode 100644 index e5705cfb4da..00000000000 --- a/sonar-plugin-api/src/main/java/org/sonar/api/test/CoverageBlock.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2021 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.api.test; - -import java.util.List; - -/** - * @deprecated since 5.6. Feature will be removed without any alternatives. - */ -@Deprecated -public interface CoverageBlock { - - TestCase testCase(); - - Testable testable(); - - List<Integer> lines(); -} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/test/MutableTestCase.java b/sonar-plugin-api/src/main/java/org/sonar/api/test/MutableTestCase.java deleted file mode 100644 index 238122e87f3..00000000000 --- a/sonar-plugin-api/src/main/java/org/sonar/api/test/MutableTestCase.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2021 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.api.test; - -import java.util.List; -import javax.annotation.Nullable; -import org.sonar.api.batch.fs.InputFile; - -/** - * @deprecated since 5.6. Feature will be removed without any alternatives. - */ -@Deprecated -public interface MutableTestCase extends TestCase { - MutableTestCase setStatus(@Nullable Status s); - - MutableTestCase setDurationInMs(@Nullable Long l); - - MutableTestCase setMessage(@Nullable String s); - - MutableTestCase setStackTrace(@Nullable String s); - - /** - * @deprecated since 5.2 not used - */ - @Deprecated - MutableTestCase setType(@Nullable String s); - - /** - * @deprecated since 5.2. Use {@link #setCoverageBlock(InputFile, List)} - */ - @Deprecated - MutableTestCase setCoverageBlock(Testable testable, List<Integer> lines); - - MutableTestCase setCoverageBlock(InputFile mainFile, List<Integer> lines); -} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/test/MutableTestPlan.java b/sonar-plugin-api/src/main/java/org/sonar/api/test/MutableTestPlan.java deleted file mode 100644 index 69b90697ded..00000000000 --- a/sonar-plugin-api/src/main/java/org/sonar/api/test/MutableTestPlan.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2021 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.api.test; - -/** - * @deprecated since 5.6. Feature will be removed without any alternatives. - */ -@Deprecated -public interface MutableTestPlan extends TestPlan<MutableTestCase> { - - /** - * Add a {@link TestCase} to this test file. - * Note that a same physical test (for example in Java a single method annotated with @Test) - * can be executed several times (parameterized tests, different test suites, ...). As a result it is perfectly valid to register several - * tests with the same name. Anyway in this situation the coverage per test will be merged for all tests with the same name. - * @param name - * @return - */ - MutableTestCase addTestCase(String name); - -} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/test/MutableTestable.java b/sonar-plugin-api/src/main/java/org/sonar/api/test/MutableTestable.java deleted file mode 100644 index d98f72a9a57..00000000000 --- a/sonar-plugin-api/src/main/java/org/sonar/api/test/MutableTestable.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2021 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.api.test; - -/** - * @deprecated since 5.6. Feature will be removed without any alternatives. - */ -@Deprecated -public interface MutableTestable extends Testable { - -} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/test/TestCase.java b/sonar-plugin-api/src/main/java/org/sonar/api/test/TestCase.java deleted file mode 100644 index 92d732a957e..00000000000 --- a/sonar-plugin-api/src/main/java/org/sonar/api/test/TestCase.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2021 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.api.test; - -import java.util.Locale; -import javax.annotation.CheckForNull; -import javax.annotation.Nullable; - -/** - * @deprecated since 5.2 not used - */ -@Deprecated -public interface TestCase { - enum Status { - OK, FAILURE, ERROR, SKIPPED; - - public static Status of(@Nullable String s) { - return s == null ? null : valueOf(s.toUpperCase(Locale.ENGLISH)); - } - } - - /** - * @deprecated since 5.2 not used - */ - @Deprecated - String TYPE_UNIT = "UNIT"; - /** - * @deprecated since 5.2 not used - */ - @Deprecated - String TYPE_INTEGRATION = "INTEGRATION"; - - /** - * Duration in milliseconds - */ - @CheckForNull - Long durationInMs(); - - /** - * @deprecated since 5.2 not used - */ - @Deprecated - String type(); - - Status status(); - - String name(); - - @CheckForNull - String message(); - - @CheckForNull - String stackTrace(); - - TestPlan testPlan(); - - boolean doesCover(); - - int countCoveredLines(); - - Iterable<CoverageBlock> coverageBlocks(); - - @CheckForNull - CoverageBlock coverageBlock(Testable testable); -} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/test/TestPlan.java b/sonar-plugin-api/src/main/java/org/sonar/api/test/TestPlan.java deleted file mode 100644 index bcf78350e5f..00000000000 --- a/sonar-plugin-api/src/main/java/org/sonar/api/test/TestPlan.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2021 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.api.test; - -import org.sonar.api.component.Perspective; - -/** - * @deprecated since 5.2 not used - */ -@Deprecated -public interface TestPlan<T extends TestCase> extends Perspective { - Iterable<T> testCases(); - - Iterable<T> testCasesByName(String name); -} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/test/Testable.java b/sonar-plugin-api/src/main/java/org/sonar/api/test/Testable.java deleted file mode 100644 index bb33fa54587..00000000000 --- a/sonar-plugin-api/src/main/java/org/sonar/api/test/Testable.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2021 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.api.test; - -import java.util.List; -import java.util.Map; -import java.util.SortedSet; -import org.sonar.api.component.Perspective; - -/** - * @deprecated since 5.2 - */ -@Deprecated -public interface Testable extends Perspective { - - List<TestCase> testCases(); - - TestCase testCaseByName(String key); - - int countTestCasesOfLine(Integer line); - - Map<Integer, Integer> testCasesByLines(); - - List<TestCase> testCasesOfLine(int line); - - SortedSet<Integer> testedLines(); - - CoverageBlock coverageBlock(TestCase testCase); - - Iterable<CoverageBlock> coverageBlocks(); -} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/test/exception/CoverageAlreadyExistsException.java b/sonar-plugin-api/src/main/java/org/sonar/api/test/exception/CoverageAlreadyExistsException.java deleted file mode 100644 index 64179bb3d3b..00000000000 --- a/sonar-plugin-api/src/main/java/org/sonar/api/test/exception/CoverageAlreadyExistsException.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2021 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.api.test.exception; - -/** - * @deprecated since 5.6 feature will be removed soon - */ -@Deprecated -public class CoverageAlreadyExistsException extends TestException { - public CoverageAlreadyExistsException(String message) { - super(message); - } -} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/test/exception/IllegalDurationException.java b/sonar-plugin-api/src/main/java/org/sonar/api/test/exception/IllegalDurationException.java deleted file mode 100644 index 51f40ae767e..00000000000 --- a/sonar-plugin-api/src/main/java/org/sonar/api/test/exception/IllegalDurationException.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2021 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.api.test.exception; - -/** - * @deprecated since 5.6 feature will be removed soon - */ -@Deprecated -public class IllegalDurationException extends TestException { - public IllegalDurationException(String message) { - super(message); - } -} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/test/exception/TestException.java b/sonar-plugin-api/src/main/java/org/sonar/api/test/exception/TestException.java deleted file mode 100644 index b5f4dba1464..00000000000 --- a/sonar-plugin-api/src/main/java/org/sonar/api/test/exception/TestException.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2021 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.api.test.exception; - -/** - * @deprecated since 5.6 feature will be removed soon - */ -@Deprecated -public class TestException extends RuntimeException { - public TestException(String message) { - super(message); - } - - public TestException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/test/exception/package-info.java b/sonar-plugin-api/src/main/java/org/sonar/api/test/exception/package-info.java deleted file mode 100644 index 54c99e78d83..00000000000 --- a/sonar-plugin-api/src/main/java/org/sonar/api/test/exception/package-info.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2021 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -@ParametersAreNonnullByDefault -package org.sonar.api.test.exception; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/test/package-info.java b/sonar-plugin-api/src/main/java/org/sonar/api/test/package-info.java deleted file mode 100644 index b7fe3d16fc0..00000000000 --- a/sonar-plugin-api/src/main/java/org/sonar/api/test/package-info.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2021 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -@ParametersAreNonnullByDefault -package org.sonar.api.test; - -import javax.annotation.ParametersAreNonnullByDefault; |