Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

ControlDirectives.java 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package com.vaadin.sass.testcases.scss;
  2. import java.io.IOException;
  3. import java.net.URISyntaxException;
  4. import junit.framework.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. public class ControlDirectives extends TestBase {
  13. String scss = "/scss/control-directives.scss";
  14. String css = "/css/control-directives.css";
  15. @Test
  16. public void testParser() throws CSSException, IOException {
  17. Parser parser = new Parser();
  18. SCSSDocumentHandler handler = new SCSSDocumentHandlerImpl();
  19. parser.setDocumentHandler(handler);
  20. parser.parseStyleSheet(getClass().getResource(scss).getPath());
  21. ScssStylesheet root = handler.getStyleSheet();
  22. Assert.assertNotNull(root);
  23. Assert.fail("Implement assert nodes");
  24. }
  25. @Test
  26. public void testCompiler() throws CSSException, URISyntaxException,
  27. IOException {
  28. testCompiler(scss, css);
  29. Assert.assertEquals("Original CSS and parsed CSS doesn't match",
  30. comparisonCss, parsedScss);
  31. }
  32. }