forked from urdt/ussd
Expose httpmocks
This commit is contained in:
15
testutil/mocks/httpmocks/requestparsermock.go
Normal file
15
testutil/mocks/httpmocks/requestparsermock.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package httpmocks
|
||||
|
||||
// MockRequestParser implements the handlers.RequestParser interface for testing
|
||||
type MockRequestParser struct {
|
||||
GetSessionIdFunc func(any) (string, error)
|
||||
GetInputFunc func(any) ([]byte, error)
|
||||
}
|
||||
|
||||
func (m *MockRequestParser) GetSessionId(rq any) (string, error) {
|
||||
return m.GetSessionIdFunc(rq)
|
||||
}
|
||||
|
||||
func (m *MockRequestParser) GetInput(rq any) ([]byte, error) {
|
||||
return m.GetInputFunc(rq)
|
||||
}
|
||||
Reference in New Issue
Block a user