Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Test
- void factorialIterShouldThrowInputCanNotBeConvertedToIntegerException() {
- try {
- Constructor<FactorialIter> c = FactorialIter.class.getDeclaredConstructor();
- c.setAccessible(true);
- FactorialIter u = c.newInstance();
- Class[] cArg = new Class[1];
- cArg[0] = String.class;
- Method method = FactorialIter.class.getDeclaredMethod("convertStringToInteger", cArg);
- method.setAccessible(true);
- Object out = method.invoke(u, "some input");
- System.out.println(out);
- } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException | InstantiationException e) {
- e.printStackTrace();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement