Search in sources :

Example 1 with Navigation

use of io.github.zutherb.appstash.shop.ui.navigation.Navigation in project the-app by devops-dojo.

the class AbstractWicketTest method createNavigationMock.

private Navigation createNavigationMock() {
    Navigation navigation = mock(Navigation.class);
    NavigationGroup mainGroup = mock(NavigationGroup.class);
    when(mainGroup.getNavigationEntries()).thenReturn(Collections.<NavigationEntry>emptyList());
    when(navigation.getMainNavigationGroup()).thenReturn(mainGroup);
    return navigation;
}
Also used : Navigation(io.github.zutherb.appstash.shop.ui.navigation.Navigation) NavigationGroup(io.github.zutherb.appstash.shop.ui.navigation.NavigationGroup)

Example 2 with Navigation

use of io.github.zutherb.appstash.shop.ui.navigation.Navigation in project the-app by devops-dojo.

the class AbstractWicketTest method initializeApplicationContext.

private ApplicationContextMock initializeApplicationContext() {
    Navigation navigationMock = createNavigationMock();
    when(navigationProvider.getNavigation()).thenReturn(navigationMock);
    ApplicationContextMock appctx = new ApplicationContextMock();
    appctx.putBean("authenticationService", authenticationService);
    appctx.putBean("cart", cart);
    appctx.putBean("checkout", checkout);
    appctx.putBean("productRepository", productRepository);
    appctx.putBean("productService", productService);
    appctx.putBean("frequentlyBoughtWithProductsRecommendationService", recommendationService);
    appctx.putBean("restTemplate", restTemplate);
    appctx.putBean("fakeAuthenticationService", fakeAuthenticationService);
    appctx.putBean("navigationProvider", navigationProvider);
    appctx.putBean("userService", userService);
    appctx.putBean("featureTooglesBean", featureTooglesBean);
    appctx.putBean("designSelector", designSelectorBean);
    appctx.putBean("dozerMapper", createDozerMapper());
    return appctx;
}
Also used : ApplicationContextMock(org.apache.wicket.spring.test.ApplicationContextMock) Navigation(io.github.zutherb.appstash.shop.ui.navigation.Navigation)

Aggregations

Navigation (io.github.zutherb.appstash.shop.ui.navigation.Navigation)2 NavigationGroup (io.github.zutherb.appstash.shop.ui.navigation.NavigationGroup)1 ApplicationContextMock (org.apache.wicket.spring.test.ApplicationContextMock)1