aboutsummaryrefslogtreecommitdiffstats
path: root/theme-compiler/tests/src/com/vaadin
diff options
context:
space:
mode:
authordenisanisimov <denis@vaadin.com>2014-01-30 16:03:33 +0200
committerVaadin Code Review <review@vaadin.com>2014-03-13 12:00:54 +0000
commit18b66b9fe767e39fa42c8e3631a3d273c0f30a59 (patch)
tree321da8e73c4eaa770e624848c3453132d51fdf9c /theme-compiler/tests/src/com/vaadin
parente623a34cd452d2e9494317ffd9f4a0159e733ad6 (diff)
downloadvaadin-framework-18b66b9fe767e39fa42c8e3631a3d273c0f30a59.tar.gz
vaadin-framework-18b66b9fe767e39fa42c8e3631a3d273c0f30a59.zip
Avoid using toString method to access to SCSS serialized state (#9530).
Change-Id: I387ae1bbc960acd5a5a588b38c6791a9c9a90690
Diffstat (limited to 'theme-compiler/tests/src/com/vaadin')
-rw-r--r--theme-compiler/tests/src/com/vaadin/sass/AbstractTestBase.java4
-rw-r--r--theme-compiler/tests/src/com/vaadin/sass/testcases/scss/AbstractDirectoryScanningSassTests.java2
-rw-r--r--theme-compiler/tests/src/com/vaadin/sass/testcases/scss/CompassImports.java2
-rw-r--r--theme-compiler/tests/src/com/vaadin/sass/tree/ImportNodeTest.java12
4 files changed, 10 insertions, 10 deletions
diff --git a/theme-compiler/tests/src/com/vaadin/sass/AbstractTestBase.java b/theme-compiler/tests/src/com/vaadin/sass/AbstractTestBase.java
index 01187b4502..ff92b636ed 100644
--- a/theme-compiler/tests/src/com/vaadin/sass/AbstractTestBase.java
+++ b/theme-compiler/tests/src/com/vaadin/sass/AbstractTestBase.java
@@ -73,7 +73,7 @@ public abstract class AbstractTestBase {
originalScss = getFileContent(file);
originalScss = originalScss.replaceAll(CR, "");
ScssStylesheet sheet = getStyleSheet(file);
- parsedScss = sheet.toString();
+ parsedScss = sheet.printState();
parsedScss = parsedScss.replace(CR, "");
Assert.assertEquals("Original CSS and parsed CSS do not match",
originalScss, parsedScss);
@@ -84,7 +84,7 @@ public abstract class AbstractTestBase {
comparisonCss = comparisonCss.replaceAll(CR, "");
ScssStylesheet sheet = getStyleSheet(scss);
sheet.compile();
- parsedScss = sheet.toString();
+ parsedScss = sheet.printState();
parsedScss = parsedScss.replaceAll(CR, "");
Assert.assertEquals("Original CSS and parsed CSS do not match",
comparisonCss, parsedScss);
diff --git a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/AbstractDirectoryScanningSassTests.java b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/AbstractDirectoryScanningSassTests.java
index 6a5f8db73d..b9b80a7588 100644
--- a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/AbstractDirectoryScanningSassTests.java
+++ b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/AbstractDirectoryScanningSassTests.java
@@ -104,7 +104,7 @@ public abstract class AbstractDirectoryScanningSassTests {
scssFile.getCanonicalPath(), null, documentHandler,
errorHandler);
scssStylesheet.compile();
- String parsedCss = scssStylesheet.toString();
+ String parsedCss = scssStylesheet.printState();
if (getCssFile(scssFile) != null) {
String referenceCss = IOUtils.toString(new FileInputStream(
diff --git a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/CompassImports.java b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/CompassImports.java
index 4e87eb2197..02415dbe15 100644
--- a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/CompassImports.java
+++ b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/CompassImports.java
@@ -74,7 +74,7 @@ public class CompassImports extends AbstractTestBase {
sheet.addResolver(new FilesystemResolver(additionalPath));
sheet.compile();
- parsedScss = sheet.toString();
+ parsedScss = sheet.printState();
parsedScss = parsedScss.replaceAll(CR, "");
Assert.assertEquals("Original CSS and parsed CSS do not match",
comparisonCss, parsedScss);
diff --git a/theme-compiler/tests/src/com/vaadin/sass/tree/ImportNodeTest.java b/theme-compiler/tests/src/com/vaadin/sass/tree/ImportNodeTest.java
index 68c886b407..a7cf442966 100644
--- a/theme-compiler/tests/src/com/vaadin/sass/tree/ImportNodeTest.java
+++ b/theme-compiler/tests/src/com/vaadin/sass/tree/ImportNodeTest.java
@@ -56,22 +56,22 @@ public class ImportNodeTest {
}
@Test
- public void testToStringWhenIsURL() {
+ public void testSerializeWhenIsURL() {
ImportNode node = new ImportNode("test", null, true);
- Assert.assertEquals("@import url(test);", node.toString());
+ Assert.assertEquals("@import url(test);", node.printState());
}
@Test
- public void testToStringWhenIsNotURL() {
+ public void testSerializeWhenIsNotURL() {
ImportNode node = new ImportNode("test", null, false);
- Assert.assertEquals("@import \"test\";", node.toString());
+ Assert.assertEquals("@import \"test\";", node.printState());
}
@Test
- public void testToStringWithMediaQueries() {
+ public void testSerializeWithMediaQueries() {
SACMediaListImpl ml = new SACMediaListImpl();
ml.add("screen");
ImportNode node = new ImportNode("test", ml, true);
- Assert.assertEquals("@import url(test) screen;", node.toString());
+ Assert.assertEquals("@import url(test) screen;", node.printState());
}
}