MCPcopy Create free account
hub / github.com/kataras/iris / TestBindingsForStructMarkExportedFieldsAsRequred

Function TestBindingsForStructMarkExportedFieldsAsRequred

hero/binding_test.go:532–551  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

530}
531
532func TestBindingsForStructMarkExportedFieldsAsRequred(t *testing.T) {
533 type (
534 Embedded struct {
535 Val string
536 }
537
538 controller struct {
539 MyService service
540 Embedded *Embedded
541 }
542 )
543
544 dependencies := []*Dependency{
545 NewDependency(&Embedded{"test"}),
546 NewDependency(&serviceImpl{}),
547 }
548
549 // should panic if fail.
550 _ = getBindingsForStruct(reflect.ValueOf(new(controller)), dependencies, true, true, false, DefaultDependencyMatcher, 0, nil)
551}

Callers

nothing calls this directly

Calls 2

NewDependencyFunction · 0.85
getBindingsForStructFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…