Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package robottutorial;
- import junit.framework.TestCase;
- import org.uispec4j.*;
- /**
- * Demo of UISpec4J testing of GPA Calculator
- * @author jdalbey
- */
- public class GUITest extends TestCase
- {
- public void testOne()
- {
- GUI gui = new GUI();
- Window win = new Window(gui);
- TextBox grade = win.getTextBox("txtGrade");
- grade.setText("B");
- TextBox units = win.getTextBox("txtUnits");
- units.setText("2");
- Button compute = win.getButton("Compute");
- compute.click();
- TextBox gpa = win.getTextBox("txtGPA");
- assertEquals("3.00", gpa.getText());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement