示例#1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testDeleteAsyncWithQuery()
        public virtual void testDeleteAsyncWithQuery()
        {
            Batch batchEntity = MockProvider.createMockBatch();

            when(historyServiceMock.deleteHistoricProcessInstancesAsync(anyListOf(typeof(string)), any(typeof(HistoricProcessInstanceQuery)), anyString())).thenReturn(batchEntity);

            IDictionary <string, object> messageBodyJson = new Dictionary <string, object>();

            messageBodyJson[DELETE_REASON] = TEST_DELETE_REASON;
            HistoricProcessInstanceQueryDto query = new HistoricProcessInstanceQueryDto();

            messageBodyJson["historicProcessInstanceQuery"] = query;

            Response response = given().contentType(ContentType.JSON).body(messageBodyJson).then().expect().statusCode(Status.OK.StatusCode).when().post(DELETE_HISTORIC_PROCESS_INSTANCES_ASYNC_URL);

            verifyBatchJson(response.asString());

            verify(historyServiceMock, times(1)).deleteHistoricProcessInstancesAsync(eq((IList <string>)null), any(typeof(HistoricProcessInstanceQuery)), Mockito.eq(TEST_DELETE_REASON));
        }