Package com.googlecode.gwt.test.editors.PersonEditor

Examples of com.googlecode.gwt.test.editors.PersonEditor.PersonDriver


   @Test
   public void editEmptyBean() {
      // Arrange
      Person Person = new Person();
      PersonEditor editor = new PersonEditor();
      PersonDriver driver = GWT.create(PersonDriver.class);
      driver.initialize(editor);

      // Test
      driver.edit(Person);

      // Assert
      assertEquals("", editor.firstName.getValue());
      assertEquals("", editor.lastName.getValue());
View Full Code Here


   public void editFilledBean() {
      // Arrange
      Person person = Person.createFilledPerson();

      PersonEditor editor = new PersonEditor();
      PersonDriver driver = GWT.create(PersonDriver.class);
      driver.initialize(editor);

      // Test
      driver.edit(person);

      // Assert
      assertEquals("John", editor.firstName.getValue());
      assertEquals("Locke", editor.lastName.getValue());
View Full Code Here

   @Test
   public void flushWithData() {
      // Arrange
      Person person = new Person();
      PersonEditor editor = new PersonEditor();
      PersonDriver driver = GWT.create(PersonDriver.class);
      driver.initialize(editor);
      // Start editing
      driver.edit(person);

      // Act : edit widget
      Browser.fillText(editor.firstName, "John");
      Browser.fillText(editor.lastName, "Locke");
      Browser.fillText(editor.address.street(), "Avenue des Champs Elysées");
      Browser.fillText(editor.address.zipWithPathEditor(), "75008");
      Browser.fillText(editor.address.city, "Paris");
      // TODO : API Browser for ValueListBox
      editor.address.stateWithPath.setValue("France", true);
      driver.flush();

      // Assert
      assertEquals("John", person.getFirstName());
      assertEquals("Locke", person.getLastName());
View Full Code Here

TOP

Related Classes of com.googlecode.gwt.test.editors.PersonEditor.PersonDriver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.