public void documentDeleteOfficeAddress()

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


  public void documentDeleteOfficeAddress ( ) throws Exception {

    final Address address = AddressFactory.createRandomAddress();
    address.setStreet("Delete Street");
    address.setCity("Delete City");
    address.setRegion("Delete Region");
    address.setPostalCode("8040");
    address.setCountry("Niger");

    final Office office = OfficeFactory.createRandomOffice();
    office.setIdentifier("officeToDelete");
    office.setName("Office To Delete");
    office.setDescription("The Office To Delete");
    this.organizationManager.createOffice(office);
    this.eventRecorder.wait(EventConstants.OPERATION_POST_OFFICE, office.getIdentifier());

    this.organizationManager.setAddressForOffice(office.getIdentifier(), address);
    this.eventRecorder.wait(EventConstants.OPERATION_PUT_ADDRESS, office.getIdentifier());

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