diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2014-02-27 13:37:22 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2014-02-27 13:38:19 +0100 |
commit | bf78055b3e3d021782a727a8072682d64f1e2a4a (patch) | |
tree | cc402792322b9cd75038a533c89b65a3b40742c0 /sonar-deprecated/src/test | |
parent | 462f3c3a33e6f2f85b068ce4c164a14d2569ed5d (diff) | |
download | sonarqube-bf78055b3e3d021782a727a8072682d64f1e2a4a.tar.gz sonarqube-bf78055b3e3d021782a727a8072682d64f1e2a4a.zip |
Deprecate remaining Java-specific stuff
Diffstat (limited to 'sonar-deprecated/src/test')
-rw-r--r-- | sonar-deprecated/src/test/java/org/sonar/api/resources/JavaTest.java | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/sonar-deprecated/src/test/java/org/sonar/api/resources/JavaTest.java b/sonar-deprecated/src/test/java/org/sonar/api/resources/JavaTest.java new file mode 100644 index 00000000000..94c42354649 --- /dev/null +++ b/sonar-deprecated/src/test/java/org/sonar/api/resources/JavaTest.java @@ -0,0 +1,40 @@ +/* + * SonarQube, open source software quality management tool. + * Copyright (C) 2008-2013 SonarSource + * mailto:contact AT sonarsource DOT com + * + * SonarQube 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. + * + * SonarQube 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.resources; + +import org.junit.Test; + +import static org.fest.assertions.Assertions.assertThat; + +public class JavaTest { + + @Test + public void test() { + Java language = new Java(); + assertThat(language.getFileSuffixes()).isEqualTo(new String[] {".java", ".jav"}); + + assertThat(Java.isJavaFile(new java.io.File("Example.java"))).isTrue(); + assertThat(Java.isJavaFile(new java.io.File("Example.JAVA"))).isTrue(); + assertThat(Java.isJavaFile(new java.io.File("Example.jav"))).isTrue(); + assertThat(Java.isJavaFile(new java.io.File("Example.Jav"))).isTrue(); + assertThat(Java.isJavaFile(new java.io.File("Example.notjava"))).isFalse(); + } + +} |