aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-css-plugin/src/test
diff options
context:
space:
mode:
authorElena Vilchik2018-06-12 13:34:33 +0200
committerGitHub2018-06-12 13:34:33 +0200
commitfb56fdc0dc18d277ccfae2cdb948e9da367377ea (patch)
treeabf9f112d0249d97bac25123f30bdb6188164401 /sonar-css-plugin/src/test
parent6cebcca87c5d276627fe22b9c53ddeb4844894b6 (diff)
downloadsonar-css-fb56fdc0dc18d277ccfae2cdb948e9da367377ea.tar.bz2
Create CSS language and set up trivial ITs (#39)
Diffstat (limited to 'sonar-css-plugin/src/test')
-rw-r--r--sonar-css-plugin/src/test/java/org/sonar/css/plugin/CssPluginTest.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/sonar-css-plugin/src/test/java/org/sonar/css/plugin/CssPluginTest.java b/sonar-css-plugin/src/test/java/org/sonar/css/plugin/CssPluginTest.java
new file mode 100644
index 0000000..3da86ca
--- /dev/null
+++ b/sonar-css-plugin/src/test/java/org/sonar/css/plugin/CssPluginTest.java
@@ -0,0 +1,42 @@
+/*
+ * SonarCSS
+ * Copyright (C) 2018-2018 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.css.plugin;
+
+import org.junit.Test;
+import org.sonar.api.Plugin;
+import org.sonar.api.SonarQubeSide;
+import org.sonar.api.SonarRuntime;
+import org.sonar.api.internal.SonarRuntimeImpl;
+import org.sonar.api.utils.Version;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+
+public class CssPluginTest {
+
+ @Test
+ public void count_extensions() throws Exception {
+ SonarRuntime runtime = SonarRuntimeImpl.forSonarQube(Version.create(6, 7), SonarQubeSide.SCANNER);
+ Plugin.Context context = new Plugin.Context(runtime);
+ Plugin underTest = new CssPlugin();
+ underTest.define(context);
+ assertThat(context.getExtensions()).hasSize(3);
+ }
+}