Changeset 657 in tmcsimulator for trunk/test/tmcsim/cadsimulator/SystemTest.java


Ignore:
Timestamp:
09/12/2022 01:30:08 PM (4 years ago)
Author:
jdalbey
Message:

Update unit tests to run on Windows (path and line separators), remove obsolete paramics test.

File:
1 edited

Legend:

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

    r653 r657  
    6262        }); 
    6363 
    64         // Check CAD Simulator appears with no script and nothing connected 
     64        // Check CAD Server appears with no script and nothing connected 
    6565        assertTrue("Title bar incorrect", cadwindow.getTitle().trim().startsWith("CAD Server")); 
    6666        Panel mainPanel = cadwindow.getPanel("contentPane"); 
     
    7272        assertEquals("network id should be None", "None", mainPanel.getTextBox("networkLoadedTF").getText().trim()); 
    7373 
    74         ParamicsCommunicator pc = null; 
    75         pc = new ParamicsCommunicator("config/paramics_communicator_config.properties"); 
    76         ParamicsCommunicatorGUI theGUI = new ParamicsCommunicatorGUI(); 
    77         pc.setGUI(theGUI); 
     74 
    7875        // Note: Can't set visible ANY windows during UISpec test 
    79  
    80         // expect pcomm to say "sleeping" 
    8176 
    8277        Window simMgrWindow = null; 
     
    10095        TextBox txtSimStatus = contentPanel.getTextBox("simulationStatusText"); 
    10196        assertEquals("No Script", txtSimStatus.getText()); 
    102         TextBox txtParamStatus = contentPanel.getTextBox("paramicsStatusInfoLabel"); 
    103         assertEquals("Unknown", txtParamStatus.getText()); 
    104         Button loadNetworkBtn = simMgrWindow.getButton("Load Network"); 
    105         assertFalse(loadNetworkBtn.isEnabled()); 
    106  
    107         Button paramicsBtn = simMgrWindow.getButton("Connect to Paramics"); 
    108         paramicsBtn.click(); 
    109         try 
    110         { 
    111             Thread.sleep(200); 
    112         } catch (Exception ex) 
    113         { 
    114         } 
    115         assertEquals("Disconnect from Paramics", paramicsBtn.getLabel()); 
    116  
    117         assertEquals("Connected", txtParamStatus.getText()); 
    118         pc.startReading(); 
    119  
    120         loadNetworkBtn.click(); 
    121         try 
    122         { 
    123             Thread.sleep(200); 
    124         } catch (Exception ex) 
    125         { 
    126         } 
    127         assertEquals("Sending Network ID", txtParamStatus.getText()); 
    128         System.out.println("Sending Network ID"); 
    129         assertFalse(loadNetworkBtn.isEnabled()); 
    130         String warmingXML = "<Paramics>\n" 
    131                 + "<Network_Status>WARMING</Network_Status>\n" 
    132                 + "<Network_ID>1</Network_ID>\n" 
    133                 + "</Paramics>"; 
    134         writedata("paramics_status.xml", warmingXML); 
    135         try 
    136         { 
    137             Thread.sleep(2100); 
    138         } catch (Exception ex) 
    139         { 
    140         } 
    141         assertEquals("Warming Up", txtParamStatus.getText()); 
    142         System.out.println("Warming Up Passed"); 
    143  
    144         try 
    145         { 
    146             Thread.sleep(2100); 
    147         } catch (Exception ex) 
    148         { 
    149         } 
    150         String loadedXML = "<Paramics>\n" 
    151                 + "<Network_Status>LOADED</Network_Status>" 
    152                 + "<Network_ID>1</Network_ID>" 
    153                 + "</Paramics>"; 
    154         writedata("paramics_status.xml", loadedXML); 
    155         try 
    156         { 
    157             Thread.sleep(2100); 
    158         } catch (Exception ex) 
    159         { 
    160         } 
    161         //assertEquals("Network 1 Loaded", txtParamStatus.getText()); 
    162         //assertEquals("network id should be 1", "1", mainPanel.getTextBox("networkLoadedTF").getText().trim()); 
    16397 
    16498 
Note: See TracChangeset for help on using the changeset viewer.