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 when the code under test tries to dispose the editing context #58

Closed hprange closed 3 years ago

hprange commented 3 years ago

The dispose method prepares the editing context for destruction, making it unusable as a result. Thus, one can expect unpredictable outcomes if the code under test calls this method, including the inability to clean up properly after the test execution. This fix overrides the EOEditingContext.dispose implementation to do nothing when invoked by the code under test.