2017-12-16 05:38:28 +01:00
|
|
|
package mvc_test
|
2017-11-24 16:34:35 +01:00
|
|
|
|
|
|
|
// black-box in combination with the handler_test
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2017-12-16 05:38:28 +01:00
|
|
|
. "github.com/kataras/iris/mvc"
|
2017-11-24 16:34:35 +01:00
|
|
|
)
|
|
|
|
|
2017-12-10 06:00:51 +01:00
|
|
|
func TestMvcEngineInAndHandler(t *testing.T) {
|
2017-12-15 19:28:06 +01:00
|
|
|
m := NewEngine()
|
|
|
|
m.Dependencies.Add(testBinderFuncUserStruct, testBinderService, testBinderFuncParam)
|
2017-11-24 16:34:35 +01:00
|
|
|
|
|
|
|
var (
|
|
|
|
h1 = m.Handler(testConsumeUserHandler)
|
|
|
|
h2 = m.Handler(testConsumeServiceHandler)
|
|
|
|
h3 = m.Handler(testConsumeParamHandler)
|
|
|
|
)
|
|
|
|
|
|
|
|
testAppWithMvcHandlers(t, h1, h2, h3)
|
|
|
|
}
|