MCPcopy Create free account
hub / github.com/codnect/procyon / TestList_MultipleComponent

Function TestList_MultipleComponent

component/component_test.go:233–249  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

231}
232
233func TestList_MultipleComponent(t *testing.T) {
234 // cleanup
235 clear(components)
236
237 // given
238 Register(NewAnyComponent).Conditional(AnyCondition{})
239 Register(NewAnotherComponent).Conditional(nil)
240
241 // when
242 componentList := List()
243
244 // then
245 require.Len(t, componentList, 2)
246
247 assert.Contains(t, components, "anyComponent")
248 assert.Contains(t, components, "anotherComponent")
249}
250
251func TestListOf_WithNonRegisteredType(t *testing.T) {
252 // cleanup

Callers

nothing calls this directly

Calls 4

RegisterFunction · 0.85
ListFunction · 0.85
ConditionalMethod · 0.80
LenMethod · 0.80

Tested by

no test coverage detected