Class componentClass = Component1.class;
Class handlerClass = ThreadSafeComponentHandler.class;
try
{
new RoleEntry( null, name, componentClass, handlerClass );
fail( "Did not throw an exception" );
}
catch ( NullPointerException npe )
{
// SUCCESS!
}
catch ( Exception e )
{
fail( "threw the wrong exception: " + e.getClass().getName() );
}
try
{
new RoleEntry( role, null, componentClass, handlerClass );
fail( "Did not throw an exception" );
}
catch ( NullPointerException npe )
{
// SUCCESS!
}
catch ( Exception e )
{
fail( "threw the wrong exception: " + e.getClass().getName() );
}
try
{
new RoleEntry( role, name, null, handlerClass );
fail( "Did not throw an exception" );
}
catch ( NullPointerException npe )
{
// SUCCESS!
}
catch ( Exception e )
{
fail( "threw the wrong exception: " + e.getClass().getName() );
}
try
{
new RoleEntry( role, name, componentClass, null );
fail( "Did not throw an exception" );
}
catch ( NullPointerException npe )
{
// SUCCESS!