| 1 package org.sapia.magnet.test; 2 3 import junit.framework.TestCase; 4 import junit.textui.TestRunner; 5 import org.sapia.magnet.MagnetRunner; 6 7 8 17 public class MainMagnetTest extends TestCase { 18 19 public static void main(String [] args) { 20 org.apache.log4j.BasicConfigurator.configure(); 21 TestRunner.run(MainMagnetTest.class); 22 } 23 24 public MainMagnetTest(String aName) { 25 super(aName); 26 } 27 28 public void testSystemMagnet() throws Exception { 29 try { 30 StringBuffer aName = new StringBuffer (). 31 append(System.getProperty("user.dir")).append(java.io.File.separator). 32 append(java.io.File.separator).append("etc"). 33 append(java.io.File.separator).append("mainMagnet.xml"); 34 for (int i = 0; i < 1; i++) { 35 MagnetRunner.main(new String [] 36 { "-magnetfile", aName.toString(), "dev" } ); 37 } 38 } catch (Exception e) { 39 } 40 } 41 42 public void testSystemMagnet_NoProfile() throws Exception { 43 try { 44 StringBuffer aName = new StringBuffer (). 45 append(System.getProperty("user.dir")).append(java.io.File.separator). 46 append(java.io.File.separator).append("etc"). 47 append(java.io.File.separator).append("mainMagnet.xml"); 48 for (int i = 0; i < 1; i++) { 49 MagnetRunner.main(new String [] 50 { "-magnetfile", aName.toString()} ); 51 } 52 } catch (Exception e) { 53 } 54 } 55 } | Popular Tags |