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

  • Making http requests using okhttp
  • runOnUiThread (Activity)
  • putExtra (Intent)
  • notifyDataSetChanged (ArrayAdapter)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Table (org.hibernate.mapping)
    A relational table
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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