I am using JUnit with Mockito. PowerMock can mock static methods, but it is not possible to use it with Java 1.4, especially because it needs annotations.
Is there any other alternative?
Thank.
(Self-promotion here) There is a PowerMock-Legacy project that allows you to use PowerMock in Java 1.4. It is a little detailed, and not all features are supported, but may be worth a try.
mocks. , , unit test. , . , , , , , .
, , , .
jMockit , ( ?). Mockito
Mockito , , . ()
, , .
Source: https://habr.com/ru/post/1796062/More articles:What to do to get javascript intellisense for my own js library in Visual Studio - javascriptGoogle Chrome placement alignment issue - cssTurn off abbreviation in getopt_long (optarg.h)? - linuxThe Wrapper procedure for write () with unistd.h included the results in an error - cHow to convert PNG to BMP at runtime? - c #Executing a REST API request in PHP - restHow to “preload” a view controller without clicking it? - modal-dialogC # Load CSV into DataGrid - c #ThreadExceptionEventHandler and Calling Delegates - multithreadingUIWebView acts differently in the app store version than the dev version - iosAll Articles