com.facebook.RequestBatch Java Examples
The following examples show how to use
com.facebook.RequestBatch.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ProgressOutputStreamTests.java From FacebookImageShareIntent with MIT License | 6 votes |
@Override protected void setUp() throws Exception { r1 = new Request(null, "4"); r2 = new Request(null, "4"); progressMap = new HashMap<Request, RequestProgress>(); progressMap.put(r1, new RequestProgress(null, r1)); progressMap.get(r1).addToMax(5); progressMap.put(r2, new RequestProgress(null, r2)); progressMap.get(r2).addToMax(5); requests = new RequestBatch(r1, r2); ByteArrayOutputStream backing = new ByteArrayOutputStream(); stream = new ProgressOutputStream(backing, requests, progressMap, MAX_PROGRESS); }
Example #2
Source File: BatchRequestTests.java From FacebookImageShareIntent with MIT License | 5 votes |
@SmallTest @MediumTest @LargeTest public void testCreateNonemptyRequestBatch() { Request meRequest = Request.newMeRequest(null, null); RequestBatch batch = new RequestBatch(new Request[] { meRequest, meRequest }); assertEquals(2, batch.size()); assertEquals(meRequest, batch.get(0)); assertEquals(meRequest, batch.get(1)); }