MCPcopy Create free account
hub / github.com/DoNewsCode/core / TestContainer_AddModule

Function TestContainer_AddModule

container/container_test.go:9–33  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func 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}

Callers

nothing calls this directly

Calls 3

ModulesMethod · 0.95
AddModuleMethod · 0.95
RunMethod · 0.45

Tested by

no test coverage detected