Changeset 6412 for vlo/branches/vlo-3.3-oeaw/vlo-commons/src/test/java/eu/clarin/cmdi/vlo/config/VloConfigMarshallerTest.java
- Timestamp:
- 08/04/15 11:46:13 (9 years ago)
- Location:
- vlo/branches/vlo-3.3-oeaw
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
vlo/branches/vlo-3.3-oeaw
- Property svn:mergeinfo changed
/vlo/trunk merged: 6318-6320,6327-6334,6337-6348,6353,6356,6358,6362-6363,6372,6384,6387,6389-6390,6394,6402,6404-6411
- Property svn:mergeinfo changed
-
vlo/branches/vlo-3.3-oeaw/vlo-commons/src/test/java/eu/clarin/cmdi/vlo/config/VloConfigMarshallerTest.java
r6087 r6412 21 21 import java.io.StringWriter; 22 22 import java.util.Arrays; 23 import java.util.Properties; 23 24 import javax.xml.transform.stream.StreamResult; 24 25 import javax.xml.transform.stream.StreamSource; … … 31 32 32 33 /** 33 * 34 * 34 35 * @author twagoo 35 36 */ 36 37 public class VloConfigMarshallerTest { 37 38 39 private final static String VLO_CONFIG_FILE = "/VloConfig.xml"; 38 40 private final static Logger logger = LoggerFactory.getLogger(VloConfigMarshallerTest.class); 39 41 private VloConfigMarshaller instance; 42 private Properties testProps; 40 43 41 44 @Before 42 45 public void setUp() throws Exception { 43 46 instance = new VloConfigMarshaller(); 47 testProps = new Properties(); 48 testProps.load(getClass().getResourceAsStream("/vloconfig.properties")); 44 49 } 45 50 … … 49 54 @Test 50 55 public void testUnmarshal() throws Exception { 51 InputStream configFile = getClass().getResourceAsStream( "/VloConfig.xml");52 VloConfig config = instance.unmarshal(new StreamSource(configFile ));56 InputStream configFile = getClass().getResourceAsStream(VLO_CONFIG_FILE); 57 VloConfig config = instance.unmarshal(new StreamSource(configFile, getClass().getResource(VLO_CONFIG_FILE).toString())); 53 58 configFile.close(); 54 59 55 60 assertNotNull(config); 56 assertEquals("http://localhost:8080/vlo-solr/core0/", config.getSolrUrl()); 57 assertEquals(2, config.getDataRoots().size()); 61 assertEquals(testProps.getProperty("solrUrl"), config.getSolrUrl()); 58 62 assertEquals(14, config.getFacetFields().size()); 59 63 }
Note: See TracChangeset
for help on using the changeset viewer.