Last active
December 24, 2015 15:19
-
-
Save rija-javed/6819180 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mockery.checking(new WExpectations() {{ | |
//Create a mockery of the ReportPublisher and CBUS class | |
q.reporter = mockery.mock(ReportPublisher.class); | |
q.cbusClient = mockery.mock(CBUS.class); | |
//Invoke one instance of the ReportPublisher mock object with the send method | |
one(q.reporter).send(with(havingRows(2)), with(any(ReportCategory.class)), with(equal(SEVERE))); | |
//Invoke one instance of the CBUS mock object with the send method | |
one(q.cbusClient).invoke(with(query(new GetEtfModels()))); | |
//The above actions will return a list containing the etfModelView1 and etfModelView2 variables | |
will(returnList(etfModelView1, | |
etfModelView2)); | |
}}); | |
//Verify the expected methods were called as specified | |
mockery.assertIsSatisfied(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment