Search in sources :

Example 1 with Cart

use of io.github.zutherb.appstash.shop.service.cart.api.Cart in project the-app by devops-dojo.

the class NavigationProviderImplTest method testRealNavigation.

@Test
public void testRealNavigation() {
    ApplicationContextMock applicationContext = new ApplicationContextMock();
    applicationContext.putBean("cart", mock(Cart.class));
    applicationContext.putBean("authenticationService", mock(AuthenticationService.class));
    NavigationProvider navigationProvider = new NavigationProviderImpl(applicationContext, authenticationService);
    Navigation realNavigation = navigationProvider.getNavigation();
    assertNotNull(realNavigation);
    assertTrue("Main Navigation must not empty", !realNavigation.getMainNavigationGroup().getNavigationEntries().isEmpty());
}
Also used : ApplicationContextMock(org.apache.wicket.spring.test.ApplicationContextMock) AuthenticationService(io.github.zutherb.appstash.shop.service.authentication.api.AuthenticationService) Cart(io.github.zutherb.appstash.shop.service.cart.api.Cart) Test(org.junit.Test)

Aggregations

AuthenticationService (io.github.zutherb.appstash.shop.service.authentication.api.AuthenticationService)1 Cart (io.github.zutherb.appstash.shop.service.cart.api.Cart)1 ApplicationContextMock (org.apache.wicket.spring.test.ApplicationContextMock)1 Test (org.junit.Test)1