(t *testing.T)
| 231 | } |
| 232 | |
| 233 | func 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 | |
| 251 | func TestListOf_WithNonRegisteredType(t *testing.T) { |
| 252 | // cleanup |
nothing calls this directly
no test coverage detected