Added Unit Tests for ReflectUtil.
Signed-off-by: Michael Hausegger <hausegger.michael@googlemail.com>
This commit is contained in:
parent
8548a49200
commit
564ac4a2d3
|
@ -18,11 +18,13 @@
|
|||
|
||||
package org.eclipse.jetty.websocket.common.util;
|
||||
|
||||
import org.eclipse.jetty.io.AbstractConnection;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
* Unit tests for class {@link ReflectUtils}.
|
||||
|
@ -68,6 +70,18 @@ public class ReflectUtilsTest
|
|||
assertFalse(ReflectUtils.isDefaultConstructable(Integer.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIsDefaultConstructableWithAbstractClass()
|
||||
{
|
||||
assertFalse(ReflectUtils.isDefaultConstructable(AbstractConnection.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIsDefaultConstructableWithObjectClass()
|
||||
{
|
||||
assertTrue(ReflectUtils.isDefaultConstructable(Object.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFindGenericClassForStringClassTwice()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue