Advertisement
jdalbey

GPA GUITest

Apr 18th, 2016
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. package robottutorial;
  2. import junit.framework.TestCase;
  3. import org.uispec4j.*;
  4.  
  5. /**
  6. * Demo of UISpec4J testing of GPA Calculator
  7. * @author jdalbey
  8. */
  9. public class GUITest extends TestCase
  10. {
  11. public void testOne()
  12. {
  13. GUI gui = new GUI();
  14. Window win = new Window(gui);
  15. TextBox grade = win.getTextBox("txtGrade");
  16. grade.setText("B");
  17. TextBox units = win.getTextBox("txtUnits");
  18. units.setText("2");
  19. Button compute = win.getButton("Compute");
  20. compute.click();
  21. TextBox gpa = win.getTextBox("txtGPA");
  22. assertEquals("3.00", gpa.getText());
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement