0
このシナリオのテストケースを作成したいと思います。メソッド= nullとその他のシナリオも設定しようとしました。しかし、いずれもInvocationTargetException
またはIllegalAccessException
を投げていません。Beanutils.setPropertyのテストケースを模擬する方法例外シナリオ
doThrow(new IllegalAccessException).when(BeanUtils).method1()
not working.Any help appreaciated.Thanks
method1{
try
{
BeanUtils.setProperty(bean, method,"abc");
}
catch (IllegalAccessException | InvocationTargetException xxxInternalException)
{
throw new SOMeException
}
}