/
TestBourbonCssProcessor.java
55 lines (44 loc) · 1.45 KB
/
TestBourbonCssProcessor.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
* Copyright (c) 2010. All rights reserved.
*/
package ro.isdc.wro.extensions.processor;
import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ro.isdc.wro.WroRuntimeException;
import ro.isdc.wro.extensions.processor.css.BourbonCssProcessor;
import ro.isdc.wro.extensions.processor.css.RubySassCssProcessor;
import ro.isdc.wro.util.WroTestUtils;
import java.io.*;
import java.net.URL;
/**
* Test ruby sass css processor.
*
* @author Simon van der Sluis
* @created Created on Apr 21, 2010
*/
public class TestBourbonCssProcessor
{
private static final Logger LOG = LoggerFactory.getLogger(TestBourbonCssProcessor.class);
/** Location (base) of bourbon sass css with bourbon test resources. */
private final URL url = getClass().getResource("bourboncss");
/** A RubySassEngine to test */
private BourbonCssProcessor bourbonCss;
@Before
public void initEngine() {
bourbonCss = new BourbonCssProcessor() {
@Override
protected void onException(final WroRuntimeException e) {
LOG.debug("[FAIL] Exception message is: {}", e.getMessage());
throw e;
}
};
}
@Test
public void testFromFolder() throws Exception {
final File testFolder = new File(url.getFile(), "test");
final File expectedFolder = new File(url.getFile(), "expected");
WroTestUtils.compareFromDifferentFoldersByName(testFolder, expectedFolder, "scss", "css", bourbonCss);
}
}