(t *testing.T)
| 7 | ) |
| 8 | |
| 9 | func TestContainer_AddModule(t *testing.T) { |
| 10 | cases := []struct { |
| 11 | name string |
| 12 | module interface{} |
| 13 | asserts func(t *testing.T, container Container) |
| 14 | }{ |
| 15 | { |
| 16 | "any", |
| 17 | "foo", |
| 18 | func(t *testing.T, container Container) { |
| 19 | assert.Contains(t, container.Modules(), "foo") |
| 20 | }, |
| 21 | }, |
| 22 | } |
| 23 | |
| 24 | for _, c := range cases { |
| 25 | c := c |
| 26 | t.Run(c.name, func(t *testing.T) { |
| 27 | t.Parallel() |
| 28 | var container Container |
| 29 | container.AddModule(c.module) |
| 30 | c.asserts(t, container) |
| 31 | }) |
| 32 | } |
| 33 | } |