mirror of
https://github.com/kataras/iris.git
synced 2025-12-19 19:07:06 +00:00
simplify by join the bind registration(ctx-transformer-to-something-func-binder and service one, which just sets the struct as it's) to one named 'In' and create a 'Child' which will return a new mvc instance with binders inheritanced from the parent one and add a simple test to the mvc_test.go - will have more later on
Former-commit-id: 81ae99390c683a61e1b0bac58725a04b9a3eebbb
This commit is contained in:
22
mvc2/mvc_test.go
Normal file
22
mvc2/mvc_test.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package mvc2_test
|
||||
|
||||
// black-box in combination with the handler_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
. "github.com/kataras/iris/mvc2"
|
||||
)
|
||||
|
||||
func TestMvcInAndHandler(t *testing.T) {
|
||||
m := New()
|
||||
m.In(testBinderFuncUserStruct, testBinderService, testBinderFuncParam)
|
||||
|
||||
var (
|
||||
h1 = m.Handler(testConsumeUserHandler)
|
||||
h2 = m.Handler(testConsumeServiceHandler)
|
||||
h3 = m.Handler(testConsumeParamHandler)
|
||||
)
|
||||
|
||||
testAppWithMvcHandlers(t, h1, h2, h3)
|
||||
}
|
||||
Reference in New Issue
Block a user