Skip to content

Instantly share code, notes, and snippets.

@4toblerone
Created September 20, 2012 11:34
Show Gist options
  • Save 4toblerone/3755398 to your computer and use it in GitHub Desktop.
Save 4toblerone/3755398 to your computer and use it in GitHub Desktop.
Spock test
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:
IllegalArgumentException error = thrown()
}
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