* added test case to assert an empty list if no beans are found at all
git-svn-id: svn+ssh://svn.synyx.de/var/svn/synyx/opensource/hera/trunk@7554 5a64d73e-33d6-4ccc-9058-23f8668ecac9
This commit is contained in:
@@ -60,6 +60,21 @@ public class BeanListFactoryBeanUnitTest {
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void returnsEmptyListIfNoBeansFound() throws Exception {
|
||||
|
||||
expect(context.getBeansOfType(Ordered.class)).andReturn(
|
||||
new HashMap<String, Ordered>());
|
||||
replay(context);
|
||||
|
||||
Object result = factory.getObject();
|
||||
assertTrue(result instanceof List<?>);
|
||||
|
||||
List<Ordered> members = (List) result;
|
||||
assertTrue(members.isEmpty());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns an {@link Ordered} with the given order.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user