-
Notifications
You must be signed in to change notification settings - Fork 0
/
godog_test.go
21 lines (17 loc) · 1.01 KB
/
godog_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package main_test
import (
"github.com/cucumber/godog"
"github.com/hysem/mini-aspire-api/features/featuretest"
)
func InitializeScenario(ctx *godog.ScenarioContext) {
uc := featuretest.NewUserContext()
lc := featuretest.NewLoanContext(uc)
ctx.Step(`^"([^"]*)" (\d+) logged in$`, uc.DoLogin)
ctx.Step(`^"([^"]*)" (\d+) request for a loan for an amount of (\d+)\$, for (\d+) weeks, for the purpose of "([^"]*)"$`, lc.RequestLoan)
ctx.Step(`^loan request should "([^"]*)"$`, lc.VerifyLoanRequestStatus)
ctx.Step(`^there should be (\d+) loan_emi entries with the "([^"]*)" "([^"]*)" respectively\.$`, lc.VeryfyLoanEMI)
ctx.Step(`^"([^"]*)" (\d+) approves the loan request and "([^"]*)"$`, lc.ApproveLoan)
ctx.Step(`^"([^"]*)" (\d+) "([^"]*)" view the loan request$`, lc.GetLoan)
ctx.Step(`^there should be a loan request in "([^"]*)" status for an amount of (\d+)\$, for (\d+) weeks, for the purpose of "([^"]*)"$`, lc.VeryfyLoan)
ctx.Step(`^"([^"]*)" (\d+) repays (\d+) towards the loan and "([^"]*)"$`, lc.RepayLoan)
}