java - EasyMock: call order on mocks created with @Mock -


is there way verify methods call order between mocks if created @mock annotation?

as described in documentation can done mock control. easymockrule not expose control object. have looked @ easymocksupport implementation, have not found way force use 1 control injected mocks. :(

public class test extends easymocksupport {   @rule  public easymockrule mocks = new easymockrule(this);   @mock  private someclass first;   @mock  private otherclass second;   @testsubject  private undertest subject = new undertest ();   @test  public void test() {    expect(first.call());    expect(second.call());    ....    //verify calls in order first.call(), second.call()  } } 

you right, not possible. enhancement allow set control in @mock annotation. can please file issue?

in case, have create mocks manually using same imockscontrol explained in documentation.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -