(t *testing.T)
| 106 | } |
| 107 | |
| 108 | func TestStructFieldsSorter(t *testing.T) { // see https://github.com/kataras/iris/issues/1343 |
| 109 | b := New() |
| 110 | b.Register(&testServiceImpl1{"parser"}) |
| 111 | b.Register(&testServiceImpl2{24}) |
| 112 | s := b.Struct(&testControllerDependenciesSorter{}, 0) |
| 113 | |
| 114 | app := iris.New() |
| 115 | app.Get("/", s.MethodHandler("Index", 0)) |
| 116 | |
| 117 | e := httptest.New(t, app) |
| 118 | |
| 119 | expectedBody := `&hero_test.testServiceImpl1{inner:"parser"} | &hero_test.testServiceImpl2{tf:24}` |
| 120 | e.GET("/").Expect().Status(httptest.StatusOK).Body().IsEqual(expectedBody) |
| 121 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…