MCPcopy Index your code
hub / github.com/DoNewsCode/core / TestChainedOptions

Function TestChainedOptions

di/optional_provider_test.go:82–91  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

80}
81
82func TestChainedOptions(t *testing.T) {
83 g := core.New()
84 g.Provide(di.Deps{di.As(di.Name(di.LocationForPC(ctor, reflect.ValueOf(ctor).Pointer()), "foo"), new(Fooer))})
85
86 g.Invoke(func(injected struct {
87 di.In
88 Stub Fooer `name:"foo"`
89 }) {
90 })
91}

Callers

nothing calls this directly

Calls 6

NewFunction · 0.92
AsFunction · 0.92
NameFunction · 0.92
LocationForPCFunction · 0.92
ProvideMethod · 0.80
InvokeMethod · 0.80

Tested by

no test coverage detected