use of org.jboss.weld.exceptions.IllegalStateException in project core by weld.
the class BeanIdentifierIndexTest method testInvalidIndex.
@Test
public void testInvalidIndex() {
BeanIdentifierIndex index = new BeanIdentifierIndex();
index.build(Collections.<Bean<?>>emptySet());
try {
index.getIdentifier(-10);
fail();
} catch (IllegalStateException e) {
// Expected
}
try {
index.getIdentifier(0);
fail();
} catch (IllegalStateException e) {
// Expected
}
try {
index.getIdentifier(10);
fail();
} catch (IllegalStateException e) {
// Expected
}
}
Aggregations