You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Interpolation.java 1.1KB

123456789101112131415161718192021222324252627282930313233
  1. package com.vaadin.sass.testcases.css;
  2. import java.io.IOException;
  3. import java.net.URISyntaxException;
  4. import org.junit.Assert;
  5. import org.junit.Test;
  6. import org.w3c.css.sac.CSSException;
  7. import com.vaadin.sass.ScssStylesheet;
  8. import com.vaadin.sass.TestBase;
  9. import com.vaadin.sass.handler.SCSSDocumentHandler;
  10. import com.vaadin.sass.handler.SCSSDocumentHandlerImpl;
  11. import com.vaadin.sass.parser.Parser;
  12. import com.vaadin.sass.tree.BlockNode;
  13. public class Interpolation extends TestBase {
  14. String scss = "/scss/interpolation.scss";
  15. @Test
  16. public void testParser() throws CSSException, URISyntaxException,
  17. IOException {
  18. Parser parser = new Parser();
  19. SCSSDocumentHandler handler = new SCSSDocumentHandlerImpl();
  20. parser.setDocumentHandler(handler);
  21. parser.parseStyleSheet(getClass().getResource(scss).getPath());
  22. ScssStylesheet root = handler.getStyleSheet();
  23. Assert.assertEquals(3, root.getChildren().size());
  24. BlockNode blockNodeWithInterpolation = (BlockNode) root.getChildren()
  25. .get(2);
  26. }
  27. }