Skip to content

Instantly share code, notes, and snippets.

@mgenov
Created May 4, 2011 08:15
Show Gist options
  • Save mgenov/954915 to your computer and use it in GitHub Desktop.
Save mgenov/954915 to your computer and use it in GitHub Desktop.
Figuring out was is broken with the testing of GWT async class
@Test
public void installSingleDevice() {
selectedPremisesEquipment = PremisesEquipmentType.copper;
boxNumber.setText("box1");
macAddress.setText("00:aa");
serialNumber.setText("sn1");
presenter.onInstallInternetService("123");
InstallDeviceAction action = service.lastAction();
assertThat(action.getContractCode(), is(equalTo("123")));
assertThat(action.getBoxNumber(), is(equalTo("box1")));
assertThat(action.getMacAddress(), is(equalTo("00:aa")));
assertThat(action.getSerialNumber(), is(equalTo("sn1")));
service.responsesWith(new DeviceInstallationResponse(DateUtil.newDate(2011,11,11)));
assertThat("different date was visualized?",displayedInstallationDate,is(equalTo(DateUtil.newDate(2011,11,11))));
}
SMELLS
lots of assert statements
action contains a lot of properties
package test;
public class Test {
public static void main(String[] args) {
System.out.println("Hello !");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment