hprange / wounit

The WOUnit framework contains a set of utilities for testing WebObjects applications using JUnit 4.7 or later capabilities.
http://hprange.github.io/wounit/
Apache License 2.0
19 stars 18 forks source link

Fix error spying EO using recent Mockito version #56

Closed hprange closed 3 years ago

hprange commented 3 years ago

Depending on the Mockito version, the MockitoJUnitRunner evaluation may not run before evaluating the WOUnit rule. As a result, fields annotated with @Spy may be null at WOUnit initialization. This fix creates and spies objects preventing an error.