Как имитировать вызов частных методов в Junit5 ⇐ JAVA
-
Anonymous
Как имитировать вызов частных методов в Junit5
Class A{ public void testA(){ // other codes priMethod(); // other codes } private void priMethod(){ // other codes } } I want to test testA method,The priMethod method is not the focus of the test and I want to skip it.Is there a method similar to dothing().when() ?
All I found were junit4 methods or ones that didn't work, but I wanted a junit5 solution since I couldn't change the junit version or the source code.
Источник: https://stackoverflow.com/questions/781 ... -in-junit5
Class A{ public void testA(){ // other codes priMethod(); // other codes } private void priMethod(){ // other codes } } I want to test testA method,The priMethod method is not the focus of the test and I want to skip it.Is there a method similar to dothing().when() ?
All I found were junit4 methods or ones that didn't work, but I wanted a junit5 solution since I couldn't change the junit version or the source code.
Источник: https://stackoverflow.com/questions/781 ... -in-junit5
Мобильная версия