Examples of containsAttribute()


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

        String view = controller.viewPreferences(null,REFERRER_ID, model);

        assertEquals(ViewNames.ADMIN_PREFERENCES, view);
        assertEquals(preferenceMap, model.asMap().get("preferenceMap"));
        assertFalse(model.containsAttribute("actionresult"));
        assertTrue(model.containsAttribute("topnav"));
        assertTrue(model.containsAttribute("tabs"));
        assertThat((String) model.asMap().get(ModelKeys.REFERRING_PAGE_ID), is(equalTo(REFERRER_ID)));

        verify(service);
    }
View Full Code Here

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

        assertEquals(ViewNames.ADMIN_PREFERENCES, view);
        assertEquals(preferenceMap, model.asMap().get("preferenceMap"));
        assertFalse(model.containsAttribute("actionresult"));
        assertTrue(model.containsAttribute("topnav"));
        assertTrue(model.containsAttribute("tabs"));
        assertThat((String) model.asMap().get(ModelKeys.REFERRING_PAGE_ID), is(equalTo(REFERRER_ID)));

        verify(service);
    }
View Full Code Here

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

        String view = controller.viewPreferences(action,REFERRER_ID, model);

        assertEquals(ViewNames.ADMIN_PREFERENCES, view);
        assertEquals(preferenceMap, model.asMap().get("preferenceMap"));
        assertEquals(action, model.asMap().get("actionresult"));
        assertTrue(model.containsAttribute("topnav"));
        assertTrue(model.containsAttribute("tabs"));
        assertThat((String) model.asMap().get(ModelKeys.REFERRING_PAGE_ID), is(equalTo(REFERRER_ID)));

        verify(service);
    }
View Full Code Here

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

        assertEquals(ViewNames.ADMIN_PREFERENCES, view);
        assertEquals(preferenceMap, model.asMap().get("preferenceMap"));
        assertEquals(action, model.asMap().get("actionresult"));
        assertTrue(model.containsAttribute("topnav"));
        assertTrue(model.containsAttribute("tabs"));
        assertThat((String) model.asMap().get(ModelKeys.REFERRING_PAGE_ID), is(equalTo(REFERRER_ID)));

        verify(service);
    }
View Full Code Here

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

        replay(service);
        String view = controller.editPreferences(model,REFERRER_ID);
        assertEquals(ViewNames.ADMIN_PREFERENCE_DETAIL, view);

        assertTrue(model.asMap().get("preferenceForm") instanceof PortalPreferenceForm);
        assertTrue(model.containsAttribute(ModelKeys.TOKENCHECK));
        assertTrue(model.containsAttribute("topnav"));
        assertTrue(model.containsAttribute("tabs"));
        assertThat((String) model.asMap().get(ModelKeys.REFERRING_PAGE_ID), is(equalTo(REFERRER_ID)));
    }
View Full Code Here

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

        String view = controller.editPreferences(model,REFERRER_ID);
        assertEquals(ViewNames.ADMIN_PREFERENCE_DETAIL, view);

        assertTrue(model.asMap().get("preferenceForm") instanceof PortalPreferenceForm);
        assertTrue(model.containsAttribute(ModelKeys.TOKENCHECK));
        assertTrue(model.containsAttribute("topnav"));
        assertTrue(model.containsAttribute("tabs"));
        assertThat((String) model.asMap().get(ModelKeys.REFERRING_PAGE_ID), is(equalTo(REFERRER_ID)));
    }

    @Test
View Full Code Here

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

        assertEquals(ViewNames.ADMIN_PREFERENCE_DETAIL, view);

        assertTrue(model.asMap().get("preferenceForm") instanceof PortalPreferenceForm);
        assertTrue(model.containsAttribute(ModelKeys.TOKENCHECK));
        assertTrue(model.containsAttribute("topnav"));
        assertTrue(model.containsAttribute("tabs"));
        assertThat((String) model.asMap().get(ModelKeys.REFERRING_PAGE_ID), is(equalTo(REFERRER_ID)));
    }

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

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

        replay(service, sessionStatus);
        String view = controller.updatePreferences(form, errors, validToken, validToken,REFERRER_ID, model, sessionStatus);

        assertEquals(ViewNames.ADMIN_PREFERENCE_DETAIL, view);
        assertTrue(errors.hasErrors());
        assertTrue(model.containsAttribute("topnav"));
        assertTrue(model.containsAttribute("tabs"));
        assertFalse("Model has not been cleared", model.isEmpty());

        verify(service, sessionStatus);
    }
View Full Code Here

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

        String view = controller.updatePreferences(form, errors, validToken, validToken,REFERRER_ID, model, sessionStatus);

        assertEquals(ViewNames.ADMIN_PREFERENCE_DETAIL, view);
        assertTrue(errors.hasErrors());
        assertTrue(model.containsAttribute("topnav"));
        assertTrue(model.containsAttribute("tabs"));
        assertFalse("Model has not been cleared", model.isEmpty());

        verify(service, sessionStatus);
    }
View Full Code Here

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

        String view = controller.view(model, REFERRER_ID, 0);

        verify(widgetService);
        assertThat(view, is(equalTo(ViewNames.STORE)));
        assertThat(model.containsAttribute(ModelKeys.WIDGETS), is(true));
        assertThat(model.containsAttribute(ModelKeys.WIDGETS_STATISTICS), is(true));
        assertThat((String) model.asMap().get(ModelKeys.REFERRING_PAGE_ID), is(equalTo(REFERRER_ID)));
        assertThat(widgets, is(sameInstance(emptyResult.getResultSet())));
        assertThat(model.containsAttribute(ModelKeys.TAGS), is(true));
        assertThat(model.containsAttribute(ModelKeys.CATEGORIES), is(true));
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.