Tabnine Logo
DefaultHandlerRegistryTest.assertEquals
Code IndexAdd Tabnine to your IDE (free)

How to use
assertEquals
method
in
org.apache.shindig.protocol.DefaultHandlerRegistryTest

Best Java code snippets using org.apache.shindig.protocol.DefaultHandlerRegistryTest.assertEquals (Showing top 20 results out of 315)

origin: org.apache.shindig/shindig-common

@Test
public void testSupportedRpcServices() throws Exception {
 assertEquals(registry.getSupportedRpcServices(),
   Sets.newHashSet("test.create", "test.get", "test.overridden", "test.exception",
     "test.futureException", "test.override.rpcname", "test.echo", "test.noArg"));
}
origin: org.apache.shindig/shindig-common

@Test
public void testSupportedRestServices() throws Exception {
 assertEquals(registry.getSupportedRestServices(),
   Sets.newHashSet("GET /test/{someParam}/{someOtherParam}",
     "PUT /test/{someParam}/{someOtherParam}",
     "DELETE /test/{someParam}/{someOtherParam}",
     "POST /test/{someParam}/{someOtherParam}",
     "GET /test/overridden/method",
     "GET /test/echo"));
}
origin: org.apache.shindig/shindig-common

@Test
public void testRpcWithInputClassThatIsntRequestItem() throws Exception {
 JSONObject rpc = new JSONObject("{ method : test.echo, params: {value: 'Bob' }}");
 RpcHandler handler = registry.getRpcHandler(rpc);
 Future<?> future = handler.execute(null, null, converter);
 assertEquals(future.get(), TestHandler.ECHO_PREFIX + "Bob");
}
origin: com.lmco.shindig/shindig-common

@Test
public void testRestWithInputClassThatIsntRequestItem() throws Exception {
 RestHandler handler = registry.getRestHandler("/test/echo", "GET");
 String[] value = {"Bob"};
 Future<?> future = handler.execute(ImmutableMap.of("value", value), null, null, converter);
 assertEquals(future.get(), TestHandler.ECHO_PREFIX + "Bob");
}
origin: apache/shindig

@Test
public void testRpcWithInputClassThatIsntRequestItem() throws Exception {
 JSONObject rpc = new JSONObject("{ method : test.echo, params: {value: 'Bob' }}");
 RpcHandler handler = registry.getRpcHandler(rpc);
 Future<?> future = handler.execute(null, null, converter);
 assertEquals(future.get(), TestHandler.ECHO_PREFIX + "Bob");
}
origin: apache/shindig

@Test
public void testNoArgumentClass() throws Exception {
 JSONObject rpc = new JSONObject("{ method : test.noArg }");
 RpcHandler handler = registry.getRpcHandler(rpc);
 Future<?> future = handler.execute(null, null, converter);
 assertEquals(TestHandler.NO_ARG_RESPONSE, future.get());
}
origin: org.apache.shindig/shindig-common

@Test
public void testNonFutureDispatch() throws Exception {
 // Test calling a handler method which does not return a future
 RestHandler handler = registry.getRestHandler("/test", "GET");
 Future<?> future = handler.execute(Maps.<String, String[]>newHashMap(), null, null, null);
 assertEquals(TestHandler.GET_RESPONSE, future.get());
}
origin: org.apache.shindig/shindig-common

@Test
public void testNoArgumentClass() throws Exception {
 JSONObject rpc = new JSONObject("{ method : test.noArg }");
 RpcHandler handler = registry.getRpcHandler(rpc);
 Future<?> future = handler.execute(null, null, converter);
 assertEquals(TestHandler.NO_ARG_RESPONSE, future.get());
}
origin: org.gatein.shindig/shindig-common

@Test
public void testRpcWithInputClassThatIsntRequestItem() throws Exception {
 JSONObject rpc = new JSONObject("{ method : test.echo, params: {value: 'Bob' }}");
 RpcHandler handler = registry.getRpcHandler(rpc);
 Future<?> future = handler.execute(null, null, converter);
 assertEquals(future.get(), TestHandler.ECHO_PREFIX + "Bob");
}
origin: org.gatein.shindig/shindig-common

@Test
public void testRestWithInputClassThatIsntRequestItem() throws Exception {
 RestHandler handler = registry.getRestHandler("/test/echo", "GET");
 String[] value = {"Bob"};
 Future<?> future = handler.execute(ImmutableMap.of("value", value), null, null, converter);
 assertEquals(future.get(), TestHandler.ECHO_PREFIX + "Bob");
}
origin: org.gatein.shindig/shindig-common

@Test
public void testNoArgumentClass() throws Exception {
 JSONObject rpc = new JSONObject("{ method : test.noArg }");
 RpcHandler handler = registry.getRpcHandler(rpc);
 Future<?> future = handler.execute(null, null, converter);
 assertEquals(TestHandler.NO_ARG_RESPONSE, future.get());
}
origin: org.wso2.org.apache.shindig/shindig-common

@Test
public void testNonFutureDispatch() throws Exception {
 // Test calling a handler method which does not return a future
 RestHandler handler = registry.getRestHandler("/test", "GET");
 Future<?> future = handler.execute(Maps.<String, String[]>newHashMap(), null, null, null);
 assertEquals(TestHandler.GET_RESPONSE, future.get());
}
origin: org.wso2.org.apache.shindig/shindig-common

@Test
public void testRestWithInputClassThatIsntRequestItem() throws Exception {
 RestHandler handler = registry.getRestHandler("/test/echo", "GET");
 String[] value = {"Bob"};
 Future<?> future = handler.execute(ImmutableMap.of("value", value), null, null, converter);
 assertEquals(future.get(), TestHandler.ECHO_PREFIX + "Bob");
}
origin: org.wso2.org.apache.shindig/shindig-common

@Test
public void testNoArgumentClass() throws Exception {
 JSONObject rpc = new JSONObject("{ method : test.noArg }");
 RpcHandler handler = registry.getRpcHandler(rpc);
 Future<?> future = handler.execute(null, null, converter);
 assertEquals(TestHandler.NO_ARG_RESPONSE, future.get());
}
origin: com.lmco.shindig/shindig-common

@Test
public void testNonFutureDispatch() throws Exception {
 // Test calling a handler method which does not return a future
 RestHandler handler = registry.getRestHandler("/test", "GET");
 Future<?> future = handler.execute(Maps.<String, String[]>newHashMap(), null, null, null);
 assertEquals(TestHandler.GET_RESPONSE, future.get());
}
origin: com.lmco.shindig/shindig-common

@Test
public void testRpcWithInputClassThatIsntRequestItem() throws Exception {
 JSONObject rpc = new JSONObject("{ method : test.echo, params: {value: 'Bob' }}");
 RpcHandler handler = registry.getRpcHandler(rpc);
 Future<?> future = handler.execute(null, null, converter);
 assertEquals(future.get(), TestHandler.ECHO_PREFIX + "Bob");
}
origin: com.lmco.shindig/shindig-common

@Test
public void testNoArgumentClass() throws Exception {
 JSONObject rpc = new JSONObject("{ method : test.noArg }");
 RpcHandler handler = registry.getRpcHandler(rpc);
 Future<?> future = handler.execute(null, null, converter);
 assertEquals(TestHandler.NO_ARG_RESPONSE, future.get());
}
origin: org.gatein.shindig/shindig-common

@Test
public void testFutureDispatch() throws Exception {
 // Test calling a handler method which does not return a future
 RestHandler handler = registry.getRestHandler("/test", "POST");
 Future<?> future = handler.execute(Maps.<String, String[]>newHashMap(), null, null, null);
 assertEquals(TestHandler.CREATE_RESPONSE, future.get());
}
origin: org.wso2.org.apache.shindig/shindig-common

@Test
public void testFutureDispatch() throws Exception {
 // Test calling a handler method which does not return a future
 RestHandler handler = registry.getRestHandler("/test", "POST");
 Future<?> future = handler.execute(Maps.<String, String[]>newHashMap(), null, null, null);
 assertEquals(TestHandler.CREATE_RESPONSE, future.get());
}
origin: org.wso2.org.apache.shindig/shindig-common

@Test
public void testRpcWithInputClassThatIsntRequestItem() throws Exception {
 JSONObject rpc = new JSONObject("{ method : test.echo, params: {value: 'Bob' }}");
 RpcHandler handler = registry.getRpcHandler(rpc);
 Future<?> future = handler.execute(null, null, converter);
 assertEquals(future.get(), TestHandler.ECHO_PREFIX + "Bob");
}
org.apache.shindig.protocolDefaultHandlerRegistryTestassertEquals

Popular methods of DefaultHandlerRegistryTest

  • assertArrayEquals
  • assertNotNull
  • assertNull
  • assertSame
  • fail

Popular in Java

  • Start an intent from android
  • setRequestProperty (URLConnection)
  • addToBackStack (FragmentTransaction)
  • getApplicationContext (Context)
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • ImageIO (javax.imageio)
  • Reference (javax.naming)
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now