Search in sources :

Example 1 with HstParameterInfoProxyFactoryImpl

use of org.hippoecm.hst.core.component.HstParameterInfoProxyFactoryImpl in project hippo by NHS-digital-website.

the class ApiCatalogueComponentTest method givenRequestWithApiCatalogueAsContentBean.

private void givenRequestWithApiCatalogueAsContentBean() {
    hstContainerUrl = new HstContainerURLImpl();
    hstRequestContext = new MockHstRequestContext();
    hstRequestContext.setSession(session);
    hstRequestContext.setParameterInfoProxyFactory(new HstParameterInfoProxyFactoryImpl());
    hstRequestContext.setContentBean(apiCatalogueDocument);
    hstRequestContext.setBaseURL(hstContainerUrl);
    ModifiableRequestContextProvider.set(hstRequestContext);
    request = new MockHstRequest();
    request.setRequestContext(hstRequestContext);
    request.setRequestURL(new StringBuffer("http://localhost:8080/site/developer/api-catalogue"));
}
Also used : MockHstRequestContext(org.hippoecm.hst.mock.core.request.MockHstRequestContext) MockHstRequest(org.hippoecm.hst.mock.core.component.MockHstRequest) HstContainerURLImpl(org.hippoecm.hst.core.container.HstContainerURLImpl) HstParameterInfoProxyFactoryImpl(org.hippoecm.hst.core.component.HstParameterInfoProxyFactoryImpl)

Example 2 with HstParameterInfoProxyFactoryImpl

use of org.hippoecm.hst.core.component.HstParameterInfoProxyFactoryImpl in project hippo by NHS-digital-website.

the class SearchPageComponentTest method setUp.

@Before
public void setUp() {
    HstServices.setComponentManager(new MockComponentManager());
    mockHstRequestContext = new MockHstRequestContext();
    mockHstRequestContext.setParameterInfoProxyFactory(new HstParameterInfoProxyFactoryImpl());
    ModifiableRequestContextProvider.set(mockHstRequestContext);
    underTest = new SearchPageComponent(graphProvider, bloomreachSearchProvider, "applicationId", "redirectUri", "baseUri");
    underTest.init(new MockServletContext(), new MockComponentConfiguration());
}
Also used : MockHstRequestContext(org.hippoecm.hst.mock.core.request.MockHstRequestContext) MockComponentManager(org.hippoecm.hst.mock.core.container.MockComponentManager) MockComponentConfiguration(org.hippoecm.hst.mock.core.request.MockComponentConfiguration) MockServletContext(org.springframework.mock.web.MockServletContext) HstParameterInfoProxyFactoryImpl(org.hippoecm.hst.core.component.HstParameterInfoProxyFactoryImpl) Before(org.junit.Before)

Aggregations

HstParameterInfoProxyFactoryImpl (org.hippoecm.hst.core.component.HstParameterInfoProxyFactoryImpl)2 MockHstRequestContext (org.hippoecm.hst.mock.core.request.MockHstRequestContext)2 HstContainerURLImpl (org.hippoecm.hst.core.container.HstContainerURLImpl)1 MockHstRequest (org.hippoecm.hst.mock.core.component.MockHstRequest)1 MockComponentManager (org.hippoecm.hst.mock.core.container.MockComponentManager)1 MockComponentConfiguration (org.hippoecm.hst.mock.core.request.MockComponentConfiguration)1 Before (org.junit.Before)1 MockServletContext (org.springframework.mock.web.MockServletContext)1