MCPcopy Create free account
hub / github.com/DoNewsCode/core / TestC_Provide

Function TestC_Provide

c_test.go:148–156  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

146}
147
148func TestC_Provide(t *testing.T) {
149 c := New()
150 c.Provide(di.Deps{
151 func() m1 { return m1{} },
152 func() m2 { return m2{} },
153 })
154 c.Invoke(func(m1, m2) {})
155 assert.Len(t, c.Modules(), 2)
156}
157
158type (
159 a struct{}

Callers

nothing calls this directly

Calls 5

ProvideMethod · 0.80
InvokeMethod · 0.80
NewFunction · 0.70
ModulesMethod · 0.65
LenMethod · 0.45

Tested by

no test coverage detected