123456789101112131415161718192021222324252627282930313233 |
- package com.vaadin.sass.testcases.css;
-
- import java.io.IOException;
- import java.net.URISyntaxException;
-
- import org.junit.Assert;
- import org.junit.Test;
- import org.w3c.css.sac.CSSException;
-
- import com.vaadin.sass.ScssStylesheet;
- import com.vaadin.sass.TestBase;
- import com.vaadin.sass.handler.SCSSDocumentHandler;
- import com.vaadin.sass.handler.SCSSDocumentHandlerImpl;
- import com.vaadin.sass.parser.Parser;
- import com.vaadin.sass.tree.BlockNode;
-
- public class Interpolation extends TestBase {
- String scss = "/scss/interpolation.scss";
-
- @Test
- public void testParser() throws CSSException, URISyntaxException,
- IOException {
- Parser parser = new Parser();
- SCSSDocumentHandler handler = new SCSSDocumentHandlerImpl();
- parser.setDocumentHandler(handler);
- parser.parseStyleSheet(getClass().getResource(scss).getPath());
- ScssStylesheet root = handler.getStyleSheet();
-
- Assert.assertEquals(3, root.getChildren().size());
- BlockNode blockNodeWithInterpolation = (BlockNode) root.getChildren()
- .get(2);
- }
- }
|