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

Function TestList

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

Source from the content-addressed store, hash-verified

208}
209
210func TestList(t *testing.T) {
211 // cleanup
212 clear(components)
213
214 // given
215 Register(NewAnyComponent).Conditional(AnyCondition{})
216
217 // when
218 componentList := List()
219
220 // then
221 require.Len(t, componentList, 1)
222
223 component := componentList[0]
224 def := component.Definition()
225
226 require.NotNil(t, def, "nil definition")
227 assert.Equal(t, "anyComponent", def.Name())
228
229 // Condition check
230 require.Len(t, component.Conditions(), 1)
231}
232
233func TestList_MultipleComponent(t *testing.T) {
234 // cleanup

Callers

nothing calls this directly

Calls 7

RegisterFunction · 0.85
ListFunction · 0.85
ConditionalMethod · 0.80
LenMethod · 0.80
ConditionsMethod · 0.80
DefinitionMethod · 0.65
NameMethod · 0.65

Tested by

no test coverage detected