Codota Logo
BaseRequestItemTest
Code IndexAdd Codota to your IDE (free)

How to use
BaseRequestItemTest
in
org.apache.shindig.protocol

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: org.apache.shindig/shindig-common

@Test
public void testGetTypedParameter() throws Exception {
 request.setParameter("anykey", "{name: 'Bob', id: '1234'}");
 InputData input = request.getTypedParameter("anykey", InputData.class);
 assertEquals("Bob", input.name);
 assertEquals(1234, input.id);
}
origin: org.gatein.shindig/shindig-common

@Test
public void testAttributes() throws Exception {
 assertNull(request.getAttribute("undefined"));
 request.setAttribute("test", "value");
 assertEquals("value", request.getAttribute("test"));
 request.setAttribute("test", null);
 assertNull(request.getAttribute("undefined"));
}
origin: org.wso2.org.apache.shindig/shindig-common

@Test
public void testGetParameters() throws Exception {
 request.setParameter("anykey", "{name: 'Bob', id: '1234'}");
 Map<String, Object> params = request.getParameters();
 assertEquals(1, params.size());
 assertTrue(params.containsKey("anykey"));
 try {
  params.put("this", "is bad");
  fail("Params should be immutable");
 } catch (UnsupportedOperationException e) {
  // As expected
 }
}
origin: com.lmco.shindig/shindig-common

@Test
public void testGetTypedParameter() throws Exception {
 request.setParameter("anykey", "{name: 'Bob', id: '1234'}");
 InputData input = request.getTypedParameter("anykey", InputData.class);
 assertEquals("Bob", input.name);
 assertEquals(1234, input.id);
}
origin: org.apache.shindig/shindig-common

@Test
public void testAttributes() throws Exception {
 assertNull(request.getAttribute("undefined"));
 request.setAttribute("test", "value");
 assertEquals("value", request.getAttribute("test"));
 request.setAttribute("test", null);
 assertNull(request.getAttribute("undefined"));
}
origin: org.apache.shindig/shindig-common

@Test
public void testGetParameters() throws Exception {
 request.setParameter("anykey", "{name: 'Bob', id: '1234'}");
 Map<String, Object> params = request.getParameters();
 assertEquals(1, params.size());
 assertTrue(params.containsKey("anykey"));
 try {
  params.put("this", "is bad");
  fail("Params should be immutable");
 } catch (UnsupportedOperationException e) {
  // As expected
 }
}
origin: org.gatein.shindig/shindig-common

@Test
public void testGetTypedParameter() throws Exception {
 request.setParameter("anykey", "{name: 'Bob', id: '1234'}");
 InputData input = request.getTypedParameter("anykey", InputData.class);
 assertEquals("Bob", input.name);
 assertEquals(1234, input.id);
}
origin: org.wso2.org.apache.shindig/shindig-common

@Test
public void testAttributes() throws Exception {
 assertNull(request.getAttribute("undefined"));
 request.setAttribute("test", "value");
 assertEquals("value", request.getAttribute("test"));
 request.setAttribute("test", null);
 assertNull(request.getAttribute("undefined"));
}
origin: apache/shindig

@Test
public void testGetParameters() throws Exception {
 request.setParameter("anykey", "{name: 'Bob', id: '1234'}");
 Map<String, Object> params = request.getParameters();
 assertEquals(1, params.size());
 assertTrue(params.containsKey("anykey"));
 try {
  params.put("this", "is bad");
  fail("Params should be immutable");
 } catch (UnsupportedOperationException e) {
  // As expected
 }
}
origin: org.wso2.org.apache.shindig/shindig-common

@Test
public void testGetTypedParameter() throws Exception {
 request.setParameter("anykey", "{name: 'Bob', id: '1234'}");
 InputData input = request.getTypedParameter("anykey", InputData.class);
 assertEquals("Bob", input.name);
 assertEquals(1234, input.id);
}
origin: com.lmco.shindig/shindig-common

@Test
public void testAttributes() throws Exception {
 assertNull(request.getAttribute("undefined"));
 request.setAttribute("test", "value");
 assertEquals("value", request.getAttribute("test"));
 request.setAttribute("test", null);
 assertNull(request.getAttribute("undefined"));
}
origin: apache/shindig

@Test
public void testGetTypedParameter() throws Exception {
 request.setParameter("anykey", "{name: 'Bob', id: '1234'}");
 InputData input = request.getTypedParameter("anykey", InputData.class);
 assertEquals("Bob", input.name);
 assertEquals(1234, input.id);
}
origin: apache/shindig

@Test
public void testAttributes() throws Exception {
 assertNull(request.getAttribute("undefined"));
 request.setAttribute("test", "value");
 assertEquals("value", request.getAttribute("test"));
 request.setAttribute("test", null);
 assertNull(request.getAttribute("undefined"));
}
origin: com.lmco.shindig/shindig-common

@Test
public void testJSONConstructor() throws Exception {
 request = new BaseRequestItem(new JSONObject('{' +
     "userId:john.doe," +
     "groupId:@self," +
     "fields:[huey,dewey,louie]" +
   '}'), null, FAKE_TOKEN, converter, converter);
 assertEquals(Lists.newArrayList("huey", "dewey", "louie"), request.getListParameter("fields"));
}
origin: org.gatein.shindig/shindig-common

@Test
public void testJSONConstructor() throws Exception {
 request = new BaseRequestItem(new JSONObject('{' +
     "userId:john.doe," +
     "groupId:@self," +
     "fields:[huey,dewey,louie]" +
   '}'), null, FAKE_TOKEN, converter, converter);
 assertEquals(Lists.newArrayList("huey", "dewey", "louie"), request.getListParameter("fields"));
}
origin: org.apache.shindig/shindig-common

@Test
public void testJSONConstructor() throws Exception {
 request = new BaseRequestItem(new JSONObject('{' +
     "userId:john.doe," +
     "groupId:@self," +
     "fields:[huey,dewey,louie]" +
   '}'), null, FAKE_TOKEN, converter, converter);
 assertEquals(Lists.newArrayList("huey", "dewey", "louie"), request.getListParameter("fields"));
}
origin: org.wso2.org.apache.shindig/shindig-common

@Test
public void testJSONConstructor() throws Exception {
 request = new BaseRequestItem(new JSONObject('{' +
     "userId:john.doe," +
     "groupId:@self," +
     "fields:[huey,dewey,louie]" +
   '}'), null, FAKE_TOKEN, converter, converter);
 assertEquals(Lists.newArrayList("huey", "dewey", "louie"), request.getListParameter("fields"));
}
origin: apache/shindig

@Test
public void testJSONConstructor() throws Exception {
 request = new BaseRequestItem(new JSONObject('{' +
     "userId:john.doe," +
     "groupId:@self," +
     "fields:[huey,dewey,louie]" +
   '}'), null, FAKE_TOKEN, converter, converter);
 assertEquals(Lists.newArrayList("huey", "dewey", "louie"), request.getListParameter("fields"));
}
origin: org.wso2.org.apache.shindig/shindig-common

@Test
public void testFields() throws Exception {
 request.setParameter("fields", "");
 assertEquals(Sets.<String>newHashSet(), request.getFields());
 request.setParameter("fields", "happy,sad,grumpy");
 assertEquals(Sets.newHashSet("happy", "sad", "grumpy"), request.getFields());
}
origin: com.lmco.shindig/shindig-common

@Test
public void testFields() throws Exception {
 request.setParameter("fields", "");
 assertEquals(Sets.<String>newHashSet(), request.getFields());
 request.setParameter("fields", "happy,sad,grumpy");
 assertEquals(Sets.newHashSet("happy", "sad", "grumpy"), request.getFields());
}
org.apache.shindig.protocolBaseRequestItemTest

Javadoc

Test BaseRequestItem

Most used methods

  • assertEquals
  • assertNull
  • assertTrue
  • fail

Popular in Java

  • Creating JSON documents from java classes using gson
  • setScale (BigDecimal)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • onRequestPermissionsResult (Fragment)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • LinkedHashMap (java.util)
    Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
  • JButton (javax.swing)
  • JOptionPane (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now