Search in sources :

Example 1 with TestClasspathTheme

use of org.ambraproject.wombat.config.theme.TestClasspathTheme in project wombat by PLOS.

the class TestSpringConfiguration method themeGraph.

@Bean
public ThemeGraph themeGraph() throws ThemeGraph.ThemeConfigurationException {
    TestClasspathTheme rootTheme = new TestClasspathTheme("root", ImmutableList.of());
    TestClasspathTheme theme1 = new TestClasspathTheme("site1", ImmutableList.of(rootTheme));
    TestClasspathTheme theme2 = new TestClasspathTheme("site2", ImmutableList.of(rootTheme));
    Set<Theme> themes = ImmutableSet.of(rootTheme, theme1, theme2);
    return new ThemeGraph(Maps.uniqueIndex(themes, Theme::getKey));
}
Also used : TestClasspathTheme(org.ambraproject.wombat.config.theme.TestClasspathTheme) Theme(org.ambraproject.wombat.config.theme.Theme) TestClasspathTheme(org.ambraproject.wombat.config.theme.TestClasspathTheme) ThemeGraph(org.ambraproject.wombat.config.theme.ThemeGraph) Bean(org.springframework.context.annotation.Bean)

Aggregations

TestClasspathTheme (org.ambraproject.wombat.config.theme.TestClasspathTheme)1 Theme (org.ambraproject.wombat.config.theme.Theme)1 ThemeGraph (org.ambraproject.wombat.config.theme.ThemeGraph)1 Bean (org.springframework.context.annotation.Bean)1