better coverage
This commit is contained in:
@ -9,6 +9,12 @@ import static org.hostsharing.hsadminng.service.util.ReflectionUtil.unchecked;
|
||||
|
||||
public class ReflectionUtilUnitTest {
|
||||
|
||||
@Test
|
||||
public void getUknownFieldThrowsIllegalArgumentException() {
|
||||
final Throwable actual = catchThrowable(() -> ReflectionUtil.getField(SomeClass.class, "unknownField"));
|
||||
assertThat(actual).isInstanceOf(IllegalArgumentException.class).hasMessage("java.lang.NoSuchFieldException: unknownField");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void setValue() {
|
||||
final TestDto dto = new TestDto(5);
|
||||
|
Reference in New Issue
Block a user