Created
May 4, 2011 08:15
-
-
Save mgenov/954915 to your computer and use it in GitHub Desktop.
Figuring out was is broken with the testing of GWT async class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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)))); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SMELLS | |
lots of assert statements | |
action contains a lot of properties | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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