(t *testing.T)
| 27 | } |
| 28 | |
| 29 | func TestBind(t *testing.T) { |
| 30 | ctor := func() Stub { |
| 31 | return Stub{} |
| 32 | } |
| 33 | g := core.New() |
| 34 | g.Provide(di.Deps{ctor, di.Bind(new(Stub), new(Fooer))}) |
| 35 | g.Invoke(func(f Fooer) { |
| 36 | assert.NotNil(t, f) |
| 37 | }) |
| 38 | } |
| 39 | |
| 40 | func TestName(t *testing.T) { |
| 41 | g := core.New() |