@Test public void fetchProfile() { Mockito.when(gowalla.getUserProfile()).thenReturn(new GowallaProfile("habuma", "Craig", "Walls", "Plano, TX", 1, 2, "https: UserProfile profile = apiAdapter.fetchUserProfile(gowalla); assertEquals("Craig Walls", profile.getName()); assertEquals("Craig", profile.getFirstName()); assertEquals("Walls", profile.getLastName()); assertNull(profile.getEmail()); assertEquals("habuma", profile.getUsername()); }
public UserProfile fetchUserProfile(Gowalla gowalla) { GowallaProfile profile = gowalla.getUserProfile(); return new UserProfileBuilder().setName(profile.getFirstName() + " " + profile.getLastName()).setUsername(profile.getId()).build(); }
GowallaAdapter implements ApiAdapter<Gowalla> { public UserProfile fetchUserProfile(Gowalla gowalla) { GowallaProfile profile = gowalla.getUserProfile(); return new UserProfileBuilder().setName(profile.getFirstName() + " " + profile.getLastName()).setUsername(profile.getId()).build(); } }
GowallaAdapter implements ApiAdapter<Gowalla> { public UserProfile fetchUserProfile(Gowalla gowalla) { GowallaProfile profile = gowalla.getUserProfile(); return new UserProfileBuilder().setName(profile.getFirstName() + " " + profile.getLastName()).setUsername(profile.getId()).build(); }  }
GowallaAdapter implements ApiAdapter<Gowalla> { public UserProfile fetchUserProfile(Gowalla gowalla) { GowallaProfile profile = gowalla.getUserProfile(); return new UserProfileBuilder().setName(profile.getFirstName() + " " + profile.getLastName()).setUsername(profile.getId()).build(); }  boolean test(Gowalla gowalla); void setConnectionValues(Gowalla gowalla, ConnectionValues values); UserProfile fetchUserProfile(Gowalla gowalla); void updateStatus(Gowalla gowalla, String message); }
GowallaAdapter implements ApiAdapter<Gowalla> { public UserProfile fetchUserProfile(Gowalla gowalla) { GowallaProfile profile = gowalla.getUserProfile(); return new UserProfileBuilder().setName(profile.getFirstName() + " " + profile.getLastName()).setUsername(profile.getId()).build(); }  boolean test(Gowalla gowalla); void setConnectionValues(Gowalla gowalla, ConnectionValues values); UserProfile fetchUserProfile(Gowalla gowalla); void updateStatus(Gowalla gowalla, String message);  }