Skip to content

Instantly share code, notes, and snippets.

@FranckSilvestre
Created November 14, 2012 10:23
Show Gist options
  • Save FranckSilvestre/4071389 to your computer and use it in GitHub Desktop.
Save FranckSilvestre/4071389 to your computer and use it in GitHub Desktop.
Interaction test exemple
package chess
import spock.lang.Specification
import static chess.PieceCouleur.BLANC
import static chess.PieceCouleur.NOIR
class EchiquierSpecification2 extends Specification {
Echiquier echiquier = new Echiquier()
IPiece piece = Mock()
def "Interaction echiquier piece"() {
when:
echiquier.deplacePiece(piece, 0,1)
then:
1*piece.bouge(0,1)
_ * _
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment