Changeset 34 in tmcsimulator for trunk/test/tmcsim


Ignore:
Timestamp:
04/29/2016 12:56:43 AM (10 years ago)
Author:
bokumura
Message:

Change unit tests to work with the new config directory restructure.

Location:
trunk/test/tmcsim
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/tmcsim/cadsimulator/CADSimulatorGUITest.java

    r19 r34  
    55import java.util.logging.Level; 
    66import java.util.logging.Logger; 
     7 
    78import static junit.framework.Assert.assertEquals; 
    89import static junit.framework.Assert.fail; 
     
    8182        CADSimulatorFixture.writedata("config.txt", configData); 
    8283        System.out.println("CADSimulator constructor"); 
    83         System.setProperty("CAD_SIM_PROPERTIES", "config.txt"); 
     84        System.setProperty("CONFIG_DIR", "config/testConfig"); 
    8485        Window cadwindow = null; 
    85         if (System.getProperty("CAD_SIM_PROPERTIES") != null) 
     86        if (System.getProperty("CONFIG_DIR") != null) 
    8687        { 
    8788            cadwindow = WindowInterceptor.run(new Trigger() 
     
    9192                    try 
    9293                    { 
    93                         app = new CADSimulator(System.getProperty("CAD_SIM_PROPERTIES")); 
     94                        app = new CADSimulator(System.getProperty("CONFIG_DIR") + System.getProperty("file.separator") + "cad_simulator_config.properties"); 
     95 
    9496                    } catch (Exception e) 
    9597                    { 
     
    100102        } else 
    101103        { 
    102             fail("CAD_SIM_PROPERTIES system property not defined."); 
     104            fail("CONFIG_DIR system property not defined."); 
    103105        } 
    104106        assertEquals("CAD Simulator", cadwindow.getTitle()); 
  • trunk/test/tmcsim/cadsimulator/CADSimulatorTest.java

    r5 r34  
    5959    { 
    6060        System.out.println("CADSimulator constructor"); 
    61         System.setProperty("CAD_SIM_PROPERTIES", "config/cad_simulator_config.properties"); 
     61        System.setProperty("CONFIG_DIR", "config/testConfig"); 
    6262        Window cadwindow = null; 
    63         if (System.getProperty("CAD_SIM_PROPERTIES") != null) 
     63        if (System.getProperty("CONFIG_DIR") != null) 
    6464        { 
    6565            cadwindow = WindowInterceptor.run(new Trigger() 
     
    6969                    try 
    7070                    { 
    71                         app = new CADSimulator(System.getProperty("CAD_SIM_PROPERTIES")); 
     71                        app = new CADSimulator(System.getProperty("CONFIG_DIR") + System.getProperty("file.separator") + "cad_simulator_config.properties"); 
    7272                    } 
    7373                    catch (Exception e) 
     
    8080        else 
    8181        { 
    82             fail("CAD_SIM_PROPERTIES system property not defined."); 
     82            fail("CONFIG_DIR system property not defined."); 
    8383        } 
    8484        assertEquals("CAD Simulator", cadwindow.getTitle()); 
  • trunk/test/tmcsim/simulationmanager/SimulationManagerSmokeTest.java

    r13 r34  
    3535 
    3636        Window cadwindow = null; 
    37         System.setProperty("CAD_SIM_PROPERTIES", "config/cad_simulator_smoketest_config.properties"); 
    38         if (System.getProperty("CAD_SIM_PROPERTIES") != null) 
     37        System.setProperty("CONFIG_DIR", "config/testConfig"); 
     38        if (System.getProperty("CONFIG_DIR") != null) 
    3939        { 
    4040            cadwindow = WindowInterceptor.run(new Trigger() 
     
    4444                    try 
    4545                    { 
    46                         engine = new CADSimulator(System.getProperty("CAD_SIM_PROPERTIES")); 
     46                        engine = new CADSimulator(System.getProperty("CONFIG_DIR") + System.getProperty("file.separator") + "cad_simulator_config.properties"); 
     47 
    4748                    } catch (Exception e) 
    4849                    { 
     
    5354        } else 
    5455        { 
    55             fail("CAD_SIM_PROPERTIES system property not defined."); 
     56            fail("CONFIG_DIR system property not defined."); 
    5657        } 
    5758 
     
    6667 
    6768        Window simMgrWindow = null; 
    68         System.setProperty("SIM_MGR_PROPERTIES", "config/sim_manager_smoketest_config.properties"); 
    69         if (System.getProperty("SIM_MGR_PROPERTIES") != null) 
     69        System.setProperty("CONFIG_DIR", "config/testConfig"); 
     70        if (System.getProperty("CONFIG_DIR") != null) 
    7071        { 
    7172            simMgrWindow = WindowInterceptor.run(new Trigger() 
     
    7576                    try 
    7677                    { 
    77                         simMgrApp = new SimulationManager(System.getProperty("SIM_MGR_PROPERTIES")); 
     78                        //simMgrApp = new SimulationManager(System.getProperty("SIM_MGR_PROPERTIES")); 
     79                        simMgrApp = new SimulationManager(System.getProperty("CONFIG_DIR") + System.getProperty("file.separator") + "sim_manager_config.properties"); 
    7880                    } catch (Exception ex) 
    7981                    { 
     
    8486        } else 
    8587        { 
    86             fail("SIM_MGR_PROPERTIES system property not defined."); 
     88            fail("CONFIG_DIR system property not defined."); 
    8789        } 
    8890 
Note: See TracChangeset for help on using the changeset viewer.