@Test public void getBookmarks() { mockServer.expect(requestTo(JobTemplate.BOOKMARKS_URL .replaceFirst("\\{\\&start\\}", "start=0") .replaceFirst("\\{\\&count\\}", "&count=10") + "&oauth2_access_token=ACCESS_TOKEN")).andExpect(method(GET)) .andRespond(withSuccess(new ClassPathResource("job_bookmarks.json", getClass()), MediaType.APPLICATION_JSON)); JobBookmarks r = linkedIn.jobOperations().getBookmarks(0, 10); assertEquals(0,r.getCount()); assertEquals(0,r.getStart()); assertEquals(1,r.getTotal()); JobBookmark b = r.getJobBookmarks().get(0); assertEquals(false, b.isApplied()); assertEquals(true, b.isSaved()); assertEquals(new Date(1322150498000l), b.getSavedTimestamp()); Job j = b.getJob(); assertEquals(true, j.isActive()); assertEquals(139355, j.getCompany().getId()); assertEquals("Allen Recruitment Consulting", j.getCompany().getName()); assertEquals(2160963, j.getId()); assertEquals("Java Developer - GWT (Perm or Contract) \u2013 Dublin, Ireland", j.getPosition().getTitle()); assertEquals(new Date(1320773338000l), j.getPostingTimestamp()); assertEquals("Our Client has an excellent opportunity for a number Java GWT Developers. You will be based out of Dublin City Centre office. Overseas candidates are welcome to apply, but ideally you should be currently eligible to work in the EU / Ireland Responsibilities: Ownership of the design and the implementation (estimation, breakdown of tasks) for complex business functional specifications through the ", j.getDescriptionSnippet()); }
public JobBookmarks getBookmarks(int start, int count) { return restOperations.getForObject(expand(BOOKMARKS_URL, new Object[] {start,count}, false), JobBookmarks.class); }
JobTemplate extends AbstractTemplate implements JobOperations { public JobBookmarks getBookmarks(int start, int count) { return restOperations.getForObject(expand(BOOKMARKS_URL, new Object[] {start,count}, false), JobBookmarks.class); } }
JobTemplate extends AbstractTemplate implements JobOperations { public JobBookmarks getBookmarks(int start, int count) { return restOperations.getForObject(expand(BOOKMARKS_URL, new Object[] {start,count}, false), JobBookmarks.class); } JobTemplate(RestOperations restOperations, ObjectMapper objectMapper ); }
JobTemplate extends AbstractTemplate implements JobOperations { public JobBookmarks getBookmarks(int start, int count) { return restOperations.getForObject(expand(BOOKMARKS_URL, new Object[] {start,count}, false), JobBookmarks.class); } JobTemplate(RestOperations restOperations, ObjectMapper objectMapper ); Jobs searchJobs(JobSearchParameters parameters); Job getJob(int id); void bookmarkJob(int id); void unbookmarkJob(int id); Jobs getSuggestions(int start, int count); JobBookmarks getBookmarks(int start, int count); }
JobTemplate extends AbstractTemplate implements JobOperations { public JobBookmarks getBookmarks(int start, int count) { return restOperations.getForObject(expand(BOOKMARKS_URL, new Object[] {start,count}, false), JobBookmarks.class); } JobTemplate(RestOperations restOperations, ObjectMapper objectMapper ); Jobs searchJobs(JobSearchParameters parameters); Job getJob(int id); void bookmarkJob(int id); void unbookmarkJob(int id); Jobs getSuggestions(int start, int count); JobBookmarks getBookmarks(int start, int count); static final String BASE_URL; static final String FIELDS; static final String SEARCH_FIELDS; static final String SEARCH_URL; static final String JOB_URL; static final String BOOKMARK_URL; static final String BOOKMARKS_URL; static final String UNBOOKMARK_URL; static final String SUGGESTED_URL; }