Created
January 23, 2017 13:07
-
-
Save Weltraumschaf/a1312d48da3de50197886d71d64edc4b to your computer and use it in GitHub Desktop.
My Spec Idea
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 de.htwg.msi.set.model | |
import org.specs2.mutable._ | |
class FieldSpec extends Specification { | |
"A new Field" should { | |
val field = new Field() | |
field.startUp() | |
"have the initial Field size of 12" { | |
field.getSizeofField must be 12 | |
} | |
"have 69 unused cards after startup" { | |
field.getUnusedCards.size must be 69 | |
} | |
"must return 12 cards after startup" { | |
field.getCardInFieldGame.size must be 12 | |
} | |
"have 81 cards in total " { | |
field.startUp() | |
field.getAllCardsInGame.size must be 81 | |
} | |
"be able to clear the field after clear" { | |
field.clear | |
field.getCardsInField.size must be 0 | |
field.getAllCardsInGame.size must be 0 | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment