Skip to content
Advertisement

Tag: jmockit

Verifying partially ordered method invocations in JMockit

I’m trying to write a unit test (using JMockit) that verifies that methods are called according to a partial order. The specific use case is ensuring that certain operations are called inside a transaction, but more generally I want to verify something like this: Method beginTransaction is called. Methods operation1 through to operationN are called in any order. Method endTransaction

Advertisement