(t *testing.T)
| 8 | ) |
| 9 | |
| 10 | func TestSingleton(t *testing.T) { |
| 11 | container.Reset() |
| 12 | |
| 13 | err := container.Singleton(func() Shape { |
| 14 | return &Circle{a: 13} |
| 15 | }) |
| 16 | assert.NoError(t, err) |
| 17 | } |
| 18 | |
| 19 | func TestSingletonLazy(t *testing.T) { |
| 20 | container.Reset() |