Created
November 13, 2012 16:33
-
-
Save FranckSilvestre/4066800 to your computer and use it in GitHub Desktop.
Spécification basique avec Spock
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 chess | |
import spock.lang.Specification | |
class PionSpecification extends Specification{ | |
def "deplacement du pion"() { | |
expect: | |
new Pion(positionHorizontale: "a", positionVerticale: 2, | |
pieceCouleur: PieceCouleur.BLANC).bouge(0,3) == false | |
new Pion(positionHorizontale: "a", positionVerticale: 2, | |
pieceCouleur: PieceCouleur.BLANC).bouge(0,2) == true | |
new Pion(positionHorizontale: "a", positionVerticale: 3, | |
pieceCouleur: PieceCouleur.BLANC).bouge(0,2) == false | |
new Pion(positionHorizontale: "a", positionVerticale: 3, | |
pieceCouleur: PieceCouleur.BLANC).bouge(0,1) == true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment