From daf51fa1988b1b3ac814f9acc7ac0264230ade51 Mon Sep 17 00:00:00 2001 From: Mike Cifelli Date: Wed, 8 Feb 2017 12:56:24 -0500 Subject: [PATCH] Added a unit test for Characters --- test/util/CharactersTester.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 test/util/CharactersTester.java diff --git a/test/util/CharactersTester.java b/test/util/CharactersTester.java new file mode 100644 index 0000000..8de40c6 --- /dev/null +++ b/test/util/CharactersTester.java @@ -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 constructor = Characters.class.getDeclaredConstructor(); + + assertTrue(Modifier.isPrivate(constructor.getModifiers())); + constructor.setAccessible(true); + constructor.newInstance(); + } + +}