Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
def 'Allow user access only for 18 over'(name, age, expected) {
given: 'user entity'
def user = new User(name, age)
when: 'validate user access'
def userCanAccess = AccessService().grantUser(user)
then:
userCanAccess == expected
where:
name | age | expected
'Fulano' | 18 | true
'Beltrano' | 19 | true
'Sicrano' | 17 | false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment