diff options
author | Henri Sara <hesara@vaadin.com> | 2012-11-27 11:14:57 +0200 |
---|---|---|
committer | Henri Sara <hesara@vaadin.com> | 2012-11-27 11:14:57 +0200 |
commit | e8ef66d2d6dde9cb1b9b0fa0df24643c1e0f6f26 (patch) | |
tree | e1db21d0bdbf3eede8f721527ce57a12e86d4c7d /theme-compiler/tests/src | |
parent | ec9b340b8d2bbbaed560834ad828f7d9857eaf15 (diff) | |
download | vaadin-framework-e8ef66d2d6dde9cb1b9b0fa0df24643c1e0f6f26.tar.gz vaadin-framework-e8ef66d2d6dde9cb1b9b0fa0df24643c1e0f6f26.zip |
Move some SCSS tests to be scanned automatically
Change-Id: I7590c6cd20f649a5c02e92673d44cf1c2721b95d
Diffstat (limited to 'theme-compiler/tests/src')
5 files changed, 48 insertions, 110 deletions
diff --git a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/AutomaticSassTests.java b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/AutomaticSassTests.java new file mode 100644 index 0000000000..1e5ec1ad37 --- /dev/null +++ b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/AutomaticSassTests.java @@ -0,0 +1,48 @@ +/* + * Copyright 2011 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.sass.testcases.scss; + +import java.net.URISyntaxException; +import java.net.URL; +import java.util.Collection; + +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameters; + +@RunWith(Parameterized.class) +public class AutomaticSassTests extends AbstractDirectoryScanningSassTests { + + public AutomaticSassTests(String scssResourceName) { + super(scssResourceName); + } + + @Override + protected URL getResourceURL(String path) { + return getResourceURLInternal(path); + } + + private static URL getResourceURLInternal(String path) { + return AutomaticSassTests.class.getResource("/automatic" + path); + } + + @Parameters + public static Collection<Object[]> getScssResourceNames() + throws URISyntaxException { + return getScssResourceNames(getResourceURLInternal("")); + } + +} diff --git a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/ListModify.java b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/ListModify.java deleted file mode 100644 index 4a65591f83..0000000000 --- a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/ListModify.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.vaadin.sass.testcases.scss; - -import org.junit.Test; - -import com.vaadin.sass.AbstractTestBase; - -public class ListModify extends AbstractTestBase { - - String scss = "/scss/listmodify.scss"; - String css = "/css/listmodify.css"; - - @Test - public void testCompiler() throws Exception { - testCompiler(scss, css); - } - -} diff --git a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/MicrosoftExtensions.java b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/MicrosoftExtensions.java deleted file mode 100644 index 5460700db4..0000000000 --- a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/MicrosoftExtensions.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2011 Vaadin Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -package com.vaadin.sass.testcases.scss; - -import org.junit.Test; - -import com.vaadin.sass.AbstractTestBase; - -/** - * Test for Microsoft specific CSS extensions. - */ -public class MicrosoftExtensions extends AbstractTestBase { - String scss = "/scss/microsoft-extensions.scss"; - String css = "/css/microsoft-extensions.css"; - - @Test - public void testCompiler() throws Exception { - testCompiler(scss, css); - } -} diff --git a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/RemoveDirective.java b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/RemoveDirective.java deleted file mode 100644 index e9e87e7b56..0000000000 --- a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/RemoveDirective.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.vaadin.sass.testcases.scss; - -import java.io.IOException; - -import org.junit.Test; -import org.w3c.css.sac.CSSException; - -import com.vaadin.sass.AbstractTestBase; - -public class RemoveDirective extends AbstractTestBase { - - String scss = "/scss/remove-directive.scss"; - String css = "/css/remove-directive.css"; - - @Test - public void testParser() throws CSSException, IOException { - - } - - @Test - public void testCompiler() throws Exception { - testCompiler(scss, css); - } - -} diff --git a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Semicolons.java b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Semicolons.java deleted file mode 100644 index 9dd8a38bfe..0000000000 --- a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Semicolons.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2011 Vaadin Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -package com.vaadin.sass.testcases.scss; - -import org.junit.Test; - -import com.vaadin.sass.AbstractTestBase; - -/** - * Test for missing and extraneous semicolon handling. - */ -public class Semicolons extends AbstractTestBase { - String scss = "/scss/semicolons.scss"; - String css = "/css/semicolons.css"; - - @Test - public void testCompiler() throws Exception { - testCompiler(scss, css); - } -} |