MCPcopy Create free account
hub / github.com/golobby/container / TestFill

Function TestFill

global_test.go:117–131  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

115}
116
117func TestFill(t *testing.T) {
118 container.Reset()
119
120 err := container.Singleton(func() Shape {
121 return &Circle{a: 13}
122 })
123 assert.NoError(t, err)
124
125 myApp := struct {
126 s Shape `Global:"type"`
127 }{}
128
129 err = container.Fill(&myApp)
130 assert.NoError(t, err)
131}

Callers

nothing calls this directly

Calls 3

ResetMethod · 0.80
SingletonMethod · 0.80
FillMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…