Class TestCaseMockTool
java.lang.Object
ch.admin.bit.jeap.testorchestrator.testsupport.TestCaseMockTool
Support class for unit testing test cases with Mockito mocks playing the part of the test agent web client and the test report service.
Provides some methods to verify the common calls that test cases make to test agents and to the report service.
Also provides some methods to mock the behaviour of test agents in the act phase.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionch.admin.bit.jeap.testagent.api.act.ActionDtoassertActCalled(String testAgentName, String action) List<ch.admin.bit.jeap.testagent.api.act.ActionDto> assertActsCalled(String testAgentName, String... actions) If there are several Actions which call act, you must use this for AssertionvoidassertDeleteCalled(String... testAgentNames) voidvoidList<ch.admin.bit.jeap.testagent.api.verify.ReportDto> assertPersistTestResultCalled(int times) ch.admin.bit.jeap.testagent.api.prepare.PreparationDtoassertPrepareCalled(String testAgentName, String testCase) ch.admin.bit.jeap.testagent.api.update.DynamicDataDtoassertUpdateCalled(String testAgentName) voidassertVerifyCalled(String... testAgentNames) builder()voidmockActCall(String testAgentName, ch.admin.bit.jeap.testagent.api.act.ActionDto actionDto, Supplier<ch.admin.bit.jeap.testagent.api.act.ActionResultDto> act) voidmockActCall(String testAgentName, Supplier<ch.admin.bit.jeap.testagent.api.act.ActionResultDto> act) voidmockPrepareCall(String testAgentName, ch.admin.bit.jeap.testagent.api.prepare.PreparationResultDto preparationResultDto)
-
Method Details
-
mockPrepareCall
public void mockPrepareCall(String testAgentName, ch.admin.bit.jeap.testagent.api.prepare.PreparationResultDto preparationResultDto) -
assertPrepareCalled
-
mockActCall
-
mockActCall
-
assertActCalled
-
assertActsCalled
public List<ch.admin.bit.jeap.testagent.api.act.ActionDto> assertActsCalled(String testAgentName, String... actions) If there are several Actions which call act, you must use this for Assertion- Parameters:
testAgentName- the Name of the TestAgentactions- can be more than one- Returns:
- A List of ActionDto's
-
assertUpdateCalled
public ch.admin.bit.jeap.testagent.api.update.DynamicDataDto assertUpdateCalled(String testAgentName) -
assertVerifyCalled
-
assertPersistTestResultCalled
public List<ch.admin.bit.jeap.testagent.api.verify.ReportDto> assertPersistTestResultCalled(int times) -
assertDeleteCalled
-
assertNoMoreTestAgentWebClientInteractions
public void assertNoMoreTestAgentWebClientInteractions() -
assertNoMoreTestReportServiceInteractions
public void assertNoMoreTestReportServiceInteractions() -
builder
-