use of org.xwiki.lesscss.internal.skin.SkinReferenceFactory in project xwiki-platform by xwiki.
the class DefaultLESSColorThemeConverterTest method setUp.
@Before
public void setUp() throws Exception {
cache = mocker.getInstance(ColorThemeCache.class);
currentColorThemeGetter = mocker.getInstance(CurrentColorThemeGetter.class);
skinReferenceFactory = mocker.getInstance(SkinReferenceFactory.class);
colorThemeReferenceFactory = mocker.getInstance(ColorThemeReferenceFactory.class);
lessResourceReferenceFactory = mocker.getInstance(LESSResourceReferenceFactory.class);
xcontextProvider = mocker.registerMockComponent(XWikiContext.TYPE_PROVIDER);
xcontext = mock(XWikiContext.class);
when(xcontextProvider.get()).thenReturn(xcontext);
xwiki = mock(XWiki.class);
when(xcontext.getWiki()).thenReturn(xwiki);
when(xwiki.getSkin(xcontext)).thenReturn("skin");
when(currentColorThemeGetter.getCurrentColorTheme(true, "default")).thenReturn("colorTheme");
when(skinReferenceFactory.createReference("skin")).thenReturn(new FSSkinReference("skin"));
when(colorThemeReferenceFactory.createReference("colorTheme")).thenReturn(new NamedColorThemeReference("colorTheme"));
when(cache.getMutex(eq(new LESSSkinFileResourceReference("file", null, null)), eq(new FSSkinReference("skin")), eq(new NamedColorThemeReference("colorTheme")))).thenReturn("mutex");
}
Aggregations