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

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

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

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 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());
}
origin: 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: org.apache.shindig/shindig-common

@Test
public void testParseCommaSeparatedList() throws Exception {
 request.setParameter("fields", "huey,dewey,louie");
 assertEquals(Lists.newArrayList("huey", "dewey", "louie"), request.getListParameter("fields"));
}
origin: org.gatein.shindig/shindig-common

@Test
public void testParseCommaSeparatedList() throws Exception {
 request.setParameter("fields", "huey,dewey,louie");
 assertEquals(Lists.newArrayList("huey", "dewey", "louie"), request.getListParameter("fields"));
}
origin: org.wso2.org.apache.shindig/shindig-common

@Test
public void testParseCommaSeparatedList() throws Exception {
 request.setParameter("fields", "huey,dewey,louie");
 assertEquals(Lists.newArrayList("huey", "dewey", "louie"), request.getListParameter("fields"));
}
origin: org.wso2.org.apache.shindig/shindig-common

@Test
public void testCount() throws Exception {
 request.setParameter("count", null);
 assertEquals(RequestItem.DEFAULT_COUNT, request.getCount());
 request.setParameter("count", "5");
 assertEquals(5, request.getCount());
}
origin: com.lmco.shindig/shindig-common

@Test
public void testStartIndex() throws Exception {
 request.setParameter("startIndex", null);
 assertEquals(RequestItem.DEFAULT_START_INDEX, request.getStartIndex());
 request.setParameter("startIndex", "5");
 assertEquals(5, request.getStartIndex());
}
origin: com.lmco.shindig/shindig-common

@Test
public void testSortOrder() throws Exception {
 request.setParameter("sortOrder", null);
 assertEquals(SortOrder.ascending, request.getSortOrder());
 request.setParameter("sortOrder", "descending");
 assertEquals(SortOrder.descending, request.getSortOrder());
}
origin: org.gatein.shindig/shindig-common

@Test
public void testStartIndex() throws Exception {
 request.setParameter("startIndex", null);
 assertEquals(RequestItem.DEFAULT_START_INDEX, request.getStartIndex());
 request.setParameter("startIndex", "5");
 assertEquals(5, request.getStartIndex());
}
origin: org.apache.shindig/shindig-common

@Test
public void testGetAppId() throws Exception {
 request.setParameter("appId", "100");
 assertEquals("100", request.getAppId());
 request.setParameter("appId", "@app");
 assertEquals(FAKE_TOKEN.getAppId(), request.getAppId());
}
origin: org.gatein.shindig/shindig-common

@Test
public void testGetAppId() throws Exception {
 request.setParameter("appId", "100");
 assertEquals("100", request.getAppId());
 request.setParameter("appId", "@app");
 assertEquals(FAKE_TOKEN.getAppId(), request.getAppId());
}
origin: org.wso2.org.apache.shindig/shindig-common

@Test
public void testGetAppId() throws Exception {
 request.setParameter("appId", "100");
 assertEquals("100", request.getAppId());
 request.setParameter("appId", "@app");
 assertEquals(FAKE_TOKEN.getAppId(), request.getAppId());
}
origin: com.lmco.shindig/shindig-common

@Test
public void testGetAppId() throws Exception {
 request.setParameter("appId", "100");
 assertEquals("100", request.getAppId());
 request.setParameter("appId", "@app");
 assertEquals(FAKE_TOKEN.getAppId(), request.getAppId());
}
origin: org.gatein.shindig/shindig-common

@Test
public void testGetInvalidJsonTypedParameter() throws Exception {
 request.setParameter("anykey", "{name: 'Bob");
 int code = 0;
 try {
  request.getTypedParameter("anykey", InputData.class);
 } catch(ProtocolException e) {
  code = e.getCode();
 }
 assertEquals(HttpServletResponse.SC_BAD_REQUEST, code);
}
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.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"));
}
org.apache.shindig.protocolBaseRequestItemTestassertEquals

Popular methods of BaseRequestItemTest

  • assertNull
  • assertTrue
  • fail

Popular in Java

  • Start an intent from android
  • setContentView (Activity)
  • addToBackStack (FragmentTransaction)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Best plugins for Eclipse
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