-
-
Save miloshadzic/3755416 to your computer and use it in GitHub Desktop.
Spock test
This file contains 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
import net.netm.platform.auxiliary.backendbox.exception.BackendboxAccessException; | |
import net.netm.platform.auxiliary.backendbox.service.AvsService; | |
import net.netm.portals.tapestry.kino.services.PinValidator; | |
import net.netm.portals.tapestry.kino.services.impl.PinValidatorImpl | |
import spock.lang.Specification | |
class PinValidatorImplTest extends Specification{ | |
PinValidator pinValidator; | |
AvsService avsService = Mock() ; | |
def setup(){ | |
pinValidator = new PinValidatorImpl(avsService); | |
} | |
def "Passing in a null should throw exception"(){ | |
when: | |
def pinstatus = pinValidator.checkPinStatus(null) | |
then: | |
thrown(IllegalArgumentException) | |
} | |
def "If pin validation via avsService return null it should throw exception"(){ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment