diff options
Diffstat (limited to 'its/plugin/src/test/java')
| -rw-r--r-- | its/plugin/src/test/java/org/sonar/css/its/MinifiedTest.java | 47 | ||||
| -rw-r--r-- | its/plugin/src/test/java/org/sonar/css/its/Tests.java | 4 |
2 files changed, 49 insertions, 2 deletions
diff --git a/its/plugin/src/test/java/org/sonar/css/its/MinifiedTest.java b/its/plugin/src/test/java/org/sonar/css/its/MinifiedTest.java new file mode 100644 index 0000000..91580bc --- /dev/null +++ b/its/plugin/src/test/java/org/sonar/css/its/MinifiedTest.java @@ -0,0 +1,47 @@ +/* + * 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.its; + +import com.sonar.orchestrator.Orchestrator; +import org.junit.BeforeClass; +import org.junit.ClassRule; +import org.junit.Test; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.sonar.css.its.Tests.getProjectMeasureAsDouble; + +public class MinifiedTest { + + private static String PROJECT_KEY = "minified-project"; + + @ClassRule + public static Orchestrator orchestrator = Tests.ORCHESTRATOR; + + @BeforeClass + public static void prepare() { + orchestrator.executeBuild(Tests.createScanner(PROJECT_KEY)); + } + + @Test + public void test() { + assertThat(getProjectMeasureAsDouble("files", PROJECT_KEY)).isEqualTo(1); + } + +} diff --git a/its/plugin/src/test/java/org/sonar/css/its/Tests.java b/its/plugin/src/test/java/org/sonar/css/its/Tests.java index d94a633..df30c9f 100644 --- a/its/plugin/src/test/java/org/sonar/css/its/Tests.java +++ b/its/plugin/src/test/java/org/sonar/css/its/Tests.java @@ -29,7 +29,6 @@ import java.util.List; import org.junit.ClassRule; import org.junit.runner.RunWith; import org.junit.runners.Suite; -import org.sonar.css.plugin.StylelintReport; import org.sonarqube.ws.Measures.ComponentWsResponse; import org.sonarqube.ws.Measures.Measure; import org.sonarqube.ws.client.HttpConnector; @@ -41,7 +40,8 @@ import org.sonarqube.ws.client.measures.ComponentRequest; @Suite.SuiteClasses({ MetricsTest.class, IssuesTest.class, - StylelintReportTest.class + StylelintReportTest.class, + MinifiedTest.class }) public class Tests { |
