Changeset 5 in tmcsimulator for trunk/test
- Timestamp:
- 04/16/2016 12:54:43 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/tmcsim/cadsimulator/CADSimulatorTest.java
r4 r5 2 2 3 3 import java.rmi.RemoteException; 4 import java.util.logging.Level; 5 import java.util.logging.Logger; 6 import javax.swing.JScrollPane; 4 7 import static junit.framework.Assert.assertEquals; 5 8 import static junit.framework.Assert.fail; … … 67 70 { 68 71 app = new CADSimulator(System.getProperty("CAD_SIM_PROPERTIES")); 69 } catch (Exception e) 72 } 73 catch (Exception e) 70 74 { 71 75 fail("Couldn't launch CADSimulator"); … … 73 77 } 74 78 }); 75 } else 79 } 80 else 76 81 { 77 82 fail("CAD_SIM_PROPERTIES system property not defined."); … … 90 95 app.theCoordinator.registerForCallback(ci); 91 96 assertEquals("2", terminals.getText().trim()); 92 97 93 98 SimulationManagerInterface si = new CADSimulatorTest.FakeSimMgr(); 94 99 app.theCoordinator.registerForCallback(si); 95 100 assertEquals("Yes", mainPanel.getTextBox("managerConnectedTF").getText().trim()); 96 101 102 Logger cadSimLogger = Logger.getLogger("tmcsim.cadsimulator"); 103 cadSimLogger.logp(Level.INFO, "", "", "Sample Info Message."); 104 105 Panel infoPane = mainPanel.getPanel("InfoMessagesPane"); 106 TextBox infoText = infoPane.getTextBox("infoMessagesTA"); 107 assertEquals(". = Sample Info Message.\n", infoText.getText()); 108 97 109 app = null; 98 // app.theViewer.dispose();99 // Window confirmPopup = null;100 // confirmPopup = WindowInterceptor.run(new Trigger()101 // {102 // public void run()103 // {104 // app.theViewer.closeViewer();105 // }106 // });107 // confirmPopup.getButton("OK").click();108 110 } 109 111 110 class FakeClient implements CADClientInterface 112 class FakeClient implements CADClientInterface 111 113 { 114 112 115 @Override 113 116 public void refresh() throws RemoteException … … 115 118 throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 116 119 } 117 118 120 } 121 119 122 class FakeSimMgr implements SimulationManagerInterface 120 123 { 124 121 125 @Override 122 126 public void tick(long theTime) throws RemoteException … … 160 164 throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 161 165 } 162 163 166 } 164 165 166 167 }
Note: See TracChangeset
for help on using the changeset viewer.
