public void documentDeleteOffice()

in component-test/src/main/java/org/apache/fineract/cn/office/OfficeApiDocumentation.java [260:282]


  public void documentDeleteOffice ( ) throws Exception {

    final Address address = AddressFactory.createRandomAddress();
    address.setStreet("Commercial Avenue");
    address.setCity("Bamenda");
    address.setRegion("North West Region");
    address.setPostalCode("8050");
    address.setCountry("Cameroon");

    final Office office = OfficeFactory.createRandomOffice();
    office.setIdentifier("office007");
    office.setName("Seventh Office ");
    office.setDescription("The Seventh Office Of MFI");
    office.setAddress(address);
    this.organizationManager.createOffice(office);
    this.eventRecorder.wait(EventConstants.OPERATION_POST_OFFICE, office.getIdentifier());

    this.mockMvc.perform(delete("/offices/" + office.getIdentifier())
            .contentType(MediaType.APPLICATION_JSON_VALUE)
            .accept(MediaType.ALL_VALUE))
            .andExpect(status().isAccepted())
            .andDo(document("document-delete-office", preprocessResponse(prettyPrint())));
  }