use of org.pentaho.platform.web.gwt.rpc.PluginGwtRpc in project pentaho-platform by pentaho.
the class PluginGwtRpcRequestMatcherTest method testGetGwtRpcReturnsAPluginGwtRpc.
// endregion
// region getGwtRpc integration
@Test
public void testGetGwtRpcReturnsAPluginGwtRpc() {
HttpServletRequest requestMock = createRequestMock(HttpMethod.POST, TEST_PATH);
IGwtRpcSerializationPolicyCache serializationPolicyCache = (moduleBaseURL, strongName, sourceProvider) -> {
throw new UnsupportedOperationException();
};
PluginGwtRpcRequestMatcher matcher = spy(new PluginGwtRpcRequestMatcher(TEST_PATTERN, TEST_RPC_METHODS_SINGLE, serializationPolicyCache));
// ---
AbstractGwtRpc gwtRpc = matcher.getGwtRpc(requestMock);
assertNotNull(gwtRpc);
assertTrue(gwtRpc instanceof PluginGwtRpc);
assertEquals(requestMock, gwtRpc.getServletRequest());
assertEquals(serializationPolicyCache, gwtRpc.getSerializationPolicyCache());
}
Aggregations