use of org.xwiki.rendering.internal.macro.velocity.VelocityMacro in project xwiki-platform by xwiki.
the class VelocityMacroSecurityTest method setUp.
@Before
public void setUp() throws Exception {
authorizationManager = mocker.registerMockComponent(ContextualAuthorizationManager.class);
BeanDescriptor mockBeanDescriptor = mock(BeanDescriptor.class);
when(mockBeanDescriptor.getProperties()).thenReturn(Collections.EMPTY_LIST);
BeanManager beanManager = mocker.getInstance(BeanManager.class);
when(beanManager.getBeanDescriptor(any(Class.class))).thenReturn(mockBeanDescriptor);
Macro velocityMacro = mocker.getComponentUnderTest();
MacroManager mockMacroManager = mocker.registerMockComponent(MacroManager.class);
when(mockMacroManager.getMacro(any(MacroId.class))).thenReturn(velocityMacro);
}
Aggregations