Skip to content

Instantly share code, notes, and snippets.

@chbaranowski
Created June 23, 2011 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save chbaranowski/1043024 to your computer and use it in GitHub Desktop.
Save chbaranowski/1043024 to your computer and use it in GitHub Desktop.
System Test Patterns
package com.seitenbau.demo.systemtest;
import javax.inject.Inject;
import org.junit.Test;
public class CashPointSystemTest extends SystemTest {
@Inject CashPointForm cashPointForm;
@Inject PositionTable positionTable;
@Test
public void addTwoArticlesIntoTheCart() throws Exception {
cashPointForm.open();
cashPointForm.enterBasarNumber("100");
cashPointForm.enterPrice("22,50");
cashPointForm.clickAdd();
cashPointForm.enterBasarNumber("101");
cashPointForm.enterPrice("23,50");
cashPointForm.clickAdd();
cashPointForm.verifySum().isEqualTo("46,00");
positionTable.getRow(1).verifyBasarNumber().isEqualTo("100");
positionTable.getRow(1).verifySeller().isEqualTo("Test Kunde");
positionTable.getRow(1).verifyPrice().isEqualTo("+22,50 Euro");
positionTable.getRow(2).verifyBasarNumber().isEqualTo("101");
positionTable.getRow(2).verifySeller().isEqualTo("");
positionTable.getRow(2).verifyPrice().isEqualTo("+23,50 Euro");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment