/
ServerTest.java
36 lines (31 loc) · 1.42 KB
/
ServerTest.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
package server;
import org.apache.geode.InternalGemFireError;
import org.apache.geode.cache.Cache;
import org.apache.geode.cache.CacheFactory;
import org.junit.Test;
public class ServerTest {
@Test
public void testWhitespaceInternal() {
System.setProperty("javax.xml.parsers.SAXParserFactory", "com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl");
Cache cache = new CacheFactory().set("cache-xml-file", "config/cache-whitespace.xml").create();
cache.close();
}
@Test(expected=InternalGemFireError.class)
public void testWhitespaceXerces() {
System.setProperty("javax.xml.parsers.SAXParserFactory", "org.apache.xerces.jaxp.SAXParserFactoryImpl");
Cache cache = new CacheFactory().set("cache-xml-file", "config/cache-whitespace.xml").create();
cache.close();
}
@Test
public void testTrimmedInternal() {
System.setProperty("javax.xml.parsers.SAXParserFactory", "com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl");
Cache cache = new CacheFactory().set("cache-xml-file", "config/cache-trimmed.xml").create();
cache.close();
}
@Test
public void testTrimmedXerces() {
System.setProperty("javax.xml.parsers.SAXParserFactory", "org.apache.xerces.jaxp.SAXParserFactoryImpl");
Cache cache = new CacheFactory().set("cache-xml-file", "config/cache-trimmed.xml").create();
cache.close();
}
}