2017-02-08 12:56:24 -05:00
|
|
|
package util;
|
|
|
|
|
2017-11-23 11:35:28 -05:00
|
|
|
import static org.hamcrest.Matchers.is;
|
|
|
|
import static org.junit.Assert.assertThat;
|
2017-02-08 12:56:24 -05:00
|
|
|
|
2017-11-12 09:42:25 -05:00
|
|
|
import java.lang.reflect.Constructor;
|
|
|
|
import java.lang.reflect.Modifier;
|
2017-02-08 12:56:24 -05:00
|
|
|
|
|
|
|
import org.junit.Test;
|
|
|
|
|
2017-03-15 13:37:39 -04:00
|
|
|
public class CharactersTest {
|
2017-02-08 12:56:24 -05:00
|
|
|
|
|
|
|
@Test
|
2017-03-02 09:54:23 -05:00
|
|
|
public void constructorIsPrivate() throws Exception {
|
2017-02-08 12:56:24 -05:00
|
|
|
Constructor<Characters> constructor = Characters.class.getDeclaredConstructor();
|
|
|
|
|
2017-11-23 11:35:28 -05:00
|
|
|
assertThat(Modifier.isPrivate(constructor.getModifiers()), is(true));
|
2017-02-08 12:56:24 -05:00
|
|
|
constructor.setAccessible(true);
|
|
|
|
constructor.newInstance();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|