in component-test/src/main/java/org/apache/fineract/cn/rhythm/RhythmApiDocumentation.java [221:244]
public void documentDeleteApplication ( ) throws InterruptedException {
final String applicationIdentifier = "goodbusiness-v1";
super.createBeatForThisHour(applicationIdentifier, "beatDefender");
List <Beat> allEntities = this.testSubject.getAllBeatsForApplication(applicationIdentifier);
Assert.assertTrue(allEntities.size() == 1);
try {
this.mockMvc.perform(delete("/applications/" + applicationIdentifier)
.accept(MediaType.ALL_VALUE)
.contentType(MediaType.ALL_VALUE)
.header(TENANT_HEADER, tenantDataStoreContext.getTenantName()))
.andExpect(status().isAccepted())
.andDo(document("document-delete-application"));
} catch (Exception e) {
e.printStackTrace();
}
this.testSubject.deleteApplication(applicationIdentifier);
Assert.assertTrue(this.eventRecorder.wait(EventConstants.DELETE_APPLICATION, applicationIdentifier));
allEntities = this.testSubject.getAllBeatsForApplication(applicationIdentifier);
Assert.assertTrue(allEntities.isEmpty());
}