Added a unit test for Characters
This commit is contained in:
parent
b55738231c
commit
daf51fa198
|
@ -0,0 +1,20 @@
|
||||||
|
package util;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
|
import java.lang.reflect.*;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
public class CharactersTester {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testConstructorIsPrivate() throws Exception {
|
||||||
|
Constructor<Characters> constructor = Characters.class.getDeclaredConstructor();
|
||||||
|
|
||||||
|
assertTrue(Modifier.isPrivate(constructor.getModifiers()));
|
||||||
|
constructor.setAccessible(true);
|
||||||
|
constructor.newInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue