aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-webserver-api
diff options
context:
space:
mode:
authorEric Giffon <eric.giffon@sonarsource.com>2023-12-06 10:53:40 +0100
committersonartech <sonartech@sonarsource.com>2023-12-08 20:03:05 +0000
commit8ecc36d9d3b3d876419b6ce634640d09195c6c44 (patch)
treefee793d94321274381a991c44f88f951cbe88481 /server/sonar-webserver-api
parent03c4bc584d43cecfdf371c02b1f2624e19413579 (diff)
downloadsonarqube-8ecc36d9d3b3d876419b6ce634640d09195c6c44.tar.gz
sonarqube-8ecc36d9d3b3d876419b6ce634640d09195c6c44.zip
SONAR-21131 Implement api v2 service for custom rule creation
Diffstat (limited to 'server/sonar-webserver-api')
-rw-r--r--server/sonar-webserver-api/src/testFixtures/java/org/sonar/server/util/TypeValidationsTesting.java38
1 files changed, 38 insertions, 0 deletions
diff --git a/server/sonar-webserver-api/src/testFixtures/java/org/sonar/server/util/TypeValidationsTesting.java b/server/sonar-webserver-api/src/testFixtures/java/org/sonar/server/util/TypeValidationsTesting.java
new file mode 100644
index 00000000000..c86389c72b0
--- /dev/null
+++ b/server/sonar-webserver-api/src/testFixtures/java/org/sonar/server/util/TypeValidationsTesting.java
@@ -0,0 +1,38 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2023 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.server.util;
+
+import java.util.Arrays;
+
+public class TypeValidationsTesting {
+ private TypeValidationsTesting() {
+ // utility class
+ }
+
+ public static TypeValidations newFullTypeValidations() {
+ return new TypeValidations(Arrays.asList(
+ new BooleanTypeValidation(),
+ new IntegerTypeValidation(),
+ new FloatTypeValidation(),
+ new StringTypeValidation(),
+ new StringListTypeValidation()
+ ));
+ }
+}