Package org.jtalks.jcommune.web.dto

Examples of org.jtalks.jcommune.web.dto.BranchDto


    @Test
    public void validBranchInformationShouldProduceSuccessResponse() throws NotFoundException {
        Component component = setupComponentMock();

        BeanPropertyBindingResult bindingResult = new BeanPropertyBindingResult(new Object(), "");
        BranchDto branchDto = new BranchDto();
        JsonResponse response = administrationController.setBranchInformation(branchDto, bindingResult, Locale.UK);

        assertEquals(response.getStatus(), JsonResponseStatus.SUCCESS);
    }
View Full Code Here


    @Test
    public void invalidBranchInformationShouldProduceFailResponse() throws NotFoundException {
        BeanPropertyBindingResult bindingResult = new BeanPropertyBindingResult(new Object(), "");
        bindingResult.addError(new ObjectError("name", "message"));
        BranchDto branchDto = new BranchDto();
        JsonResponse response = administrationController.setBranchInformation(branchDto, bindingResult, Locale.UK);

        assertEquals(response.getStatus(), JsonResponseStatus.FAIL);
    }
View Full Code Here

TOP

Related Classes of org.jtalks.jcommune.web.dto.BranchDto

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.