| Commit in servicemix/base/src/test/java/org/servicemix/components/vfs on MAIN | |||
| FileTest.java | +23 | -3 | 1.1 -> 1.2 |
Added condition where example_win.xml is used when running this usecase in a windows os and example.xml on other os.
servicemix/base/src/test/java/org/servicemix/components/vfs
diff -u -r1.1 -r1.2 --- FileTest.java 28 Jul 2005 18:18:29 -0000 1.1 +++ FileTest.java 6 Aug 2005 11:41:08 -0000 1.2 @@ -24,17 +24,37 @@
import javax.xml.namespace.QName; /**
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
public class FileTest extends TestSupport {
+ private final String SYSTEM_OS_KEY = "os.name"; + private final String WINDOWS = "Windows"; +
public void testSendMessagesToFileSystemThenPoollThem() throws Exception {
QName service = new QName("http://servicemix.org/cheese/", "fileSender");
-
assertSendAndReceiveMessages(service);
}
protected AbstractXmlApplicationContext createBeanFactory() {
- return new ClassPathXmlApplicationContext("org/servicemix/components/vfs/example.xml");
+ return new ClassPathXmlApplicationContext(getSystemSupportedXMLConfig());
+ }
+
+ protected String getSystemSupportedXMLConfig(){
+ String os = System.getProperty(this.SYSTEM_OS_KEY);
+
+ boolean isWindows = false;
+
+ int index = (os==null?-1:os.indexOf(this.WINDOWS));
+
+ if(index > -1 ){
+ isWindows = true;
+ }
+
+ if(isWindows){
+ return "org/servicemix/components/vfs/example_win.xml";
+ }else{
+ return "org/servicemix/components/vfs/example.xml";
+ }
} }
