Spock Web Console

subscribe to the feed Subscribe
example123 (via #spockwebconsole)
tweet this script Tweet

example123

Published 8 months ago by Sergey
Actions  ➤ Edit In Console Back To Console Show/Hide Line Numbers View Recent Scripts
import spock.lang.*


class Spec extends Specification {
    private expectedData = [consumer: 1, agent: 2 ]

    @Unroll()
    def "Check if ifpLeadGuid is correct for #role"(role) {
        when:
            def ifpLeadGuid

            if (role == "consumer") {
                ifpLeadGuid = 1
            } else if (role == "agent") {
                ifpLeadGuid = 2
            }

        then: "Verify age"
            ifpLeadGuid == expectedData[role]

        where:
            role << ["consumer", "agent"]
           

    }
}