Package org.springframework.ui

Examples of org.springframework.ui.Model.containsAttribute()


        verify(widgetService, tagService, categoryService);
        assertThat(view, is(equalTo(ViewNames.STORE)));
        assertThat(model.containsAttribute(ModelKeys.WIDGETS), is(true));
        assertThat(model.containsAttribute(ModelKeys.WIDGETS_STATISTICS), is(true));
        assertThat(model.containsAttribute(ModelKeys.TAGS), is(true));
        assertThat(model.containsAttribute(ModelKeys.CATEGORIES), is(true));
        assertThat(model.containsAttribute(ModelKeys.REFERRING_PAGE_ID), is(true));
        assertThat(model.containsAttribute(ModelKeys.OFFSET), is(true));
        assertThat(model.containsAttribute(ModelKeys.SELECTED_CATEGORY), is(true));
View Full Code Here


        verify(widgetService, tagService, categoryService);
        assertThat(view, is(equalTo(ViewNames.STORE)));
        assertThat(model.containsAttribute(ModelKeys.WIDGETS), is(true));
        assertThat(model.containsAttribute(ModelKeys.WIDGETS_STATISTICS), is(true));
        assertThat(model.containsAttribute(ModelKeys.TAGS), is(true));
        assertThat(model.containsAttribute(ModelKeys.CATEGORIES), is(true));
        assertThat(model.containsAttribute(ModelKeys.REFERRING_PAGE_ID), is(true));
        assertThat(model.containsAttribute(ModelKeys.OFFSET), is(true));
        assertThat(model.containsAttribute(ModelKeys.SELECTED_CATEGORY), is(true));

    }
View Full Code Here

        assertThat(view, is(equalTo(ViewNames.STORE)));
        assertThat(model.containsAttribute(ModelKeys.WIDGETS), is(true));
        assertThat(model.containsAttribute(ModelKeys.WIDGETS_STATISTICS), is(true));
        assertThat(model.containsAttribute(ModelKeys.TAGS), is(true));
        assertThat(model.containsAttribute(ModelKeys.CATEGORIES), is(true));
        assertThat(model.containsAttribute(ModelKeys.REFERRING_PAGE_ID), is(true));
        assertThat(model.containsAttribute(ModelKeys.OFFSET), is(true));
        assertThat(model.containsAttribute(ModelKeys.SELECTED_CATEGORY), is(true));

    }
View Full Code Here

        assertThat(model.containsAttribute(ModelKeys.WIDGETS), is(true));
        assertThat(model.containsAttribute(ModelKeys.WIDGETS_STATISTICS), is(true));
        assertThat(model.containsAttribute(ModelKeys.TAGS), is(true));
        assertThat(model.containsAttribute(ModelKeys.CATEGORIES), is(true));
        assertThat(model.containsAttribute(ModelKeys.REFERRING_PAGE_ID), is(true));
        assertThat(model.containsAttribute(ModelKeys.OFFSET), is(true));
        assertThat(model.containsAttribute(ModelKeys.SELECTED_CATEGORY), is(true));

    }

    @Test
View Full Code Here

        assertThat(model.containsAttribute(ModelKeys.WIDGETS_STATISTICS), is(true));
        assertThat(model.containsAttribute(ModelKeys.TAGS), is(true));
        assertThat(model.containsAttribute(ModelKeys.CATEGORIES), is(true));
        assertThat(model.containsAttribute(ModelKeys.REFERRING_PAGE_ID), is(true));
        assertThat(model.containsAttribute(ModelKeys.OFFSET), is(true));
        assertThat(model.containsAttribute(ModelKeys.SELECTED_CATEGORY), is(true));

    }

    @Test
    public void searchWidgets() {
View Full Code Here

        verify(widgetService);

        assertEquals(ViewNames.STORE, view);
        final Map<String, Object> modelMap = model.asMap();
        assertEquals(searchTerm, modelMap.get(ModelKeys.SEARCH_TERM));
        assertTrue(model.containsAttribute(ModelKeys.WIDGETS));
        assertThat(model.containsAttribute(ModelKeys.WIDGETS_STATISTICS), is(true));
        assertEquals(offset, modelMap.get(ModelKeys.OFFSET));
        assertEquals(result, modelMap.get(ModelKeys.WIDGETS));
        assertThat(model.containsAttribute(ModelKeys.TAGS), is(true));
        assertThat(model.containsAttribute(ModelKeys.CATEGORIES), is(true));
View Full Code Here

        assertEquals(ViewNames.STORE, view);
        final Map<String, Object> modelMap = model.asMap();
        assertEquals(searchTerm, modelMap.get(ModelKeys.SEARCH_TERM));
        assertTrue(model.containsAttribute(ModelKeys.WIDGETS));
        assertThat(model.containsAttribute(ModelKeys.WIDGETS_STATISTICS), is(true));
        assertEquals(offset, modelMap.get(ModelKeys.OFFSET));
        assertEquals(result, modelMap.get(ModelKeys.WIDGETS));
        assertThat(model.containsAttribute(ModelKeys.TAGS), is(true));
        assertThat(model.containsAttribute(ModelKeys.CATEGORIES), is(true));
View Full Code Here

        assertEquals(searchTerm, modelMap.get(ModelKeys.SEARCH_TERM));
        assertTrue(model.containsAttribute(ModelKeys.WIDGETS));
        assertThat(model.containsAttribute(ModelKeys.WIDGETS_STATISTICS), is(true));
        assertEquals(offset, modelMap.get(ModelKeys.OFFSET));
        assertEquals(result, modelMap.get(ModelKeys.WIDGETS));
        assertThat(model.containsAttribute(ModelKeys.TAGS), is(true));
        assertThat(model.containsAttribute(ModelKeys.CATEGORIES), is(true));

    }

    @Test
View Full Code Here

        assertTrue(model.containsAttribute(ModelKeys.WIDGETS));
        assertThat(model.containsAttribute(ModelKeys.WIDGETS_STATISTICS), is(true));
        assertEquals(offset, modelMap.get(ModelKeys.OFFSET));
        assertEquals(result, modelMap.get(ModelKeys.WIDGETS));
        assertThat(model.containsAttribute(ModelKeys.TAGS), is(true));
        assertThat(model.containsAttribute(ModelKeys.CATEGORIES), is(true));

    }

    @Test
    public void startAddWidget() {
View Full Code Here

        String viewName = controller.getCategories("",REFERRER_ID, model);
        verify(categoryService);

        assertEquals(ViewNames.ADMIN_CATEGORIES, viewName);
        assertEquals(categories, model.asMap().get("categories"));
        assertFalse(model.containsAttribute("actionresult"));
        assertTrue(model.containsAttribute("category"));
        assertEquals("Check that the category object available", new CategoryImpl(), model.asMap().get("category"));
        assertTrue(model.containsAttribute("topnav"));
        assertTrue(model.containsAttribute("tabs"));
        assertTrue("verify tokencheck", model.asMap().containsKey(ModelKeys.TOKENCHECK));
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.