Package org.jtalks.common.model.entity

Examples of org.jtalks.common.model.entity.Component.addProperty()


    }

    @Test
    public void getForumLogoShouldReturnDefaultLogoWhenLogoPropertyIsEmpty() throws ImageProcessException {
        Component forumComponent = new Component();
        forumComponent.addProperty(TransactionalComponentService.LOGO_PROPERTY, "");
        when(componentService.getComponentOfForum()).thenReturn(forumComponent);
        when(componentService.getComponentModificationTime()).thenReturn(new Date());
        when(logoControllerUtils.getDefaultImage()).thenReturn(validImage);

        MockHttpServletResponse response = new MockHttpServletResponse();
View Full Code Here


        String logoProperty = "logo";
        Base64Wrapper wrapper = new Base64Wrapper();
        byte[] logoBytes = wrapper.decodeB64Bytes(logoProperty);

        forumComponent.addProperty(TransactionalComponentService.LOGO_PROPERTY, logoProperty);
        when(componentService.getComponentOfForum()).thenReturn(forumComponent);
        when(componentService.getComponentModificationTime()).thenReturn(new Date());

        MockHttpServletResponse response = new MockHttpServletResponse();
        administrationController.getForumLogo(new MockHttpServletRequest(), response);
View Full Code Here


    @Test
    public void getFavIconPNGShouldReturnDefaultIconWhenIconPropertyIsEmpty() throws ImageProcessException {
        Component forumComponent = new Component();
        forumComponent.addProperty(TransactionalComponentService.COMPONENT_FAVICON_PNG_PARAM, "");
        when(componentService.getComponentOfForum()).thenReturn(forumComponent);
        when(componentService.getComponentModificationTime()).thenReturn(new Date());
        when(favIconPngControllerUtils.getDefaultImage()).thenReturn(validImage);

        MockHttpServletResponse response = new MockHttpServletResponse();
View Full Code Here

        String logoProperty = "logo";
        Base64Wrapper wrapper = new Base64Wrapper();
        byte[] logoBytes = wrapper.decodeB64Bytes(logoProperty);

        forumComponent.addProperty(TransactionalComponentService.COMPONENT_FAVICON_PNG_PARAM, logoProperty);
        when(componentService.getComponentOfForum()).thenReturn(forumComponent);
        when(componentService.getComponentModificationTime()).thenReturn(new Date());

        MockHttpServletResponse response = new MockHttpServletResponse();
        administrationController.getFavIconPNG(new MockHttpServletRequest(), response);
View Full Code Here


    @Test
    public void getFavIconICOShouldReturnDefaultIconWhenIconPropertyIsEmpty() throws ImageProcessException {
        Component forumComponent = new Component();
        forumComponent.addProperty(TransactionalComponentService.COMPONENT_FAVICON_PNG_PARAM, "");
        when(componentService.getComponentOfForum()).thenReturn(forumComponent);
        when(componentService.getComponentModificationTime()).thenReturn(new Date());
        when(favIconIcoControllerUtils.getDefaultImage()).thenReturn(validImage);

        MockHttpServletResponse response = new MockHttpServletResponse();
View Full Code Here

        String logoProperty = "logo";
        Base64Wrapper wrapper = new Base64Wrapper();
        byte[] logoBytes = wrapper.decodeB64Bytes(logoProperty);

        forumComponent.addProperty(TransactionalComponentService.COMPONENT_FAVICON_ICO_PARAM, logoProperty);
        when(componentService.getComponentOfForum()).thenReturn(forumComponent);
        when(componentService.getComponentModificationTime()).thenReturn(new Date());

        MockHttpServletResponse response = new MockHttpServletResponse();
        administrationController.getFavIconICO(new MockHttpServletRequest(), response);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.