(t *testing.T)
| 300 | } |
| 301 | |
| 302 | func TestContainer_NamedTransient(t *testing.T) { |
| 303 | err := instance.NamedTransient("theCircle", func() Shape { |
| 304 | return &Circle{a: 13} |
| 305 | }) |
| 306 | assert.NoError(t, err) |
| 307 | |
| 308 | var sh Shape |
| 309 | err = instance.NamedResolve(&sh, "theCircle") |
| 310 | assert.NoError(t, err) |
| 311 | assert.Equal(t, sh.GetArea(), 13) |
| 312 | } |
| 313 | |
| 314 | func TestContainer_NamedTransientLazy(t *testing.T) { |
| 315 | err := instance.NamedTransientLazy("theCircle", func() Shape { |
nothing calls this directly
no test coverage detected
searching dependent graphs…