@Test public void getUserProfile() { mockServer.expect(requestTo(XingTemplate.DEFAULT_BASE_URL + ProfileTemplate.USERS_URL.replaceFirst("\\{id\\}", "me"))).andExpect(method(GET)) .andRespond(withSuccess(new ClassPathResource("testdata/profile.json", getClass()), MediaType.APPLICATION_JSON)); XingProfile userProfile = xing.profileOperations().getUserProfile(); assertEquals("6628146_33f97b", userProfile.getId()); assertEquals("Johannes", userProfile.getFirstName()); assertEquals("Bühler", userProfile.getLastName()); List<String> badges = userProfile.getBadges(); assertEquals(1, badges.size()); assertEquals("PREMIUM", badges.get(0)); assertThat(userProfile.getPermalink(), is(not(nullValue()))); assertThat(userProfile.getProfessionalExperience(), is(not(nullValue()))); assertEquals(2, userProfile.getProfessionalExperience().getNonPrimaryCompanies().size()); assertEquals("CANOOENGINEERINGAG", userProfile.getProfessionalExperience().getPrimaryCompany().getTag()); assertEquals(Integer.valueOf(1), userProfile.getProfessionalExperience().getPrimaryCompany().getBeginDate().getMonth()); assertEquals("Senior Software Engineer", userProfile.getProfessionalExperience().getPrimaryCompany().getTitle()); assertEquals(CareerLevel.PROFESSIONAL_EXPERIENCED, userProfile.getProfessionalExperience().getPrimaryCompany().getCareerLevel()); assertThat(userProfile.getEducationalBackground(), is(not(nullValue()))); assertEquals(2, userProfile.getEducationalBackground().getSchools().size()); assertEquals(3, userProfile.getEducationalBackground().getQualifications().size()); assertEquals("Java Design Patterns Course Certificate", userProfile.getEducationalBackground().getQualifications().get(2)); assertEquals("http: assertEquals("http: assertEquals("http: assertEquals("http: assertEquals("http: assertEquals("http: assertEquals("http: assertEquals("http: assertEquals("http: }
public XingProfile getUserProfile() { return getProfileById("me"); }
ProfileTemplate extends AbstractTemplate implements ProfileOperations { public XingProfile getUserProfile() { return getProfileById("me"); } }
ProfileTemplate extends AbstractTemplate implements ProfileOperations { public XingProfile getUserProfile() { return getProfileById("me"); } ProfileTemplate(String xingBaseUrl, RestOperations restOperations, ObjectMapper objectMapper);  ProfileTemplate(RestOperations restOperations, ObjectMapper objectMapper); }
ProfileTemplate extends AbstractTemplate implements ProfileOperations { public XingProfile getUserProfile() { return getProfileById("me"); } ProfileTemplate(String xingBaseUrl, RestOperations restOperations, ObjectMapper objectMapper);  ProfileTemplate(RestOperations restOperations, ObjectMapper objectMapper); String getProfileId(); XingProfile getUserProfile(); XingProfile getProfileById(String id); }
ProfileTemplate extends AbstractTemplate implements ProfileOperations { public XingProfile getUserProfile() { return getProfileById("me"); } ProfileTemplate(String xingBaseUrl, RestOperations restOperations, ObjectMapper objectMapper);  ProfileTemplate(RestOperations restOperations, ObjectMapper objectMapper); String getProfileId(); XingProfile getUserProfile(); XingProfile getProfileById(String id);  }