21 lines
1.3 KiB
Go
21 lines
1.3 KiB
Go
package godog
|
|
|
|
import cucumber "github.com/cucumber/godog"
|
|
|
|
func Setup(ctx *cucumber.ScenarioContext, testCenter TestCenter) {
|
|
gtc := genericTestCenter{testCenter: testCenter}
|
|
ctx.Step(`^the resource is created`, gtc.theResourceIsCreated)
|
|
ctx.Step(`^the response indicates that the ([^\s]+) already exists`, gtc.theResourceAlreadyExists)
|
|
ctx.Step(`^the response indicates that the user doesn't have right`, gtc.theUserMissRight)
|
|
ctx.Step(`^the response indicates that this a bad request`, gtc.badRequest)
|
|
ctx.Step(`^the response indicates that this a forbidden request`, gtc.forbiddenRequest)
|
|
ctx.Step(`^the response has status (\d+)$`, gtc.theResponseHasStatus)
|
|
ctx.Step(`^the ([^\s]+) ([^\s]+) doesn\'t exist yet`, gtc.resourceDoesntExist)
|
|
ctx.Step(`^the field ([^\s]+) is (\d+)$`, gtc.theFieldHasValue)
|
|
ctx.Step(`^the field ([^\s]+) has value "([^"]*)"$`, gtc.theFieldHasValue)
|
|
ctx.Step(`^the user create a[n]* ([^\s]+) with the following data:$`, gtc.theUserCreatesAResourcesWithTheFollowingData)
|
|
ctx.Step(`^the user update a[n]* ([^\s]+) with the following data:$`, gtc.theUserUpdatesAResourcesWithTheFollowingData)
|
|
ctx.Step(`^the user patch a[n]* ([^\s]+) with the following data:$`, gtc.theUserUpdatesAResourcesWithTheFollowingData)
|
|
ctx.Step(`^the ([^\s]+) exists with the following data:$`, gtc.theResourceExistWithTheFollowingData)
|
|
}
|