Skip to content

Commit

Permalink
fix IT / manual tests before release
Browse files Browse the repository at this point in the history
  • Loading branch information
Jérôme LELEU committed Jun 7, 2016
1 parent c8cc62f commit 71e91a8
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
Expand Up @@ -92,6 +92,6 @@ private void internalTestRestBasic(final CasRestBasicAuthClient client, int nbAt
client.destroyTicketGrantingTicket(profile);

TestsHelper.expectException(() -> client.requestServiceTicket(PAC4J_BASE_URL, profile), TechnicalException.class,
"Service ticket request for `<HttpTGTProfile> | id: username | attributes: {} | roles: [] | permissions: [] | isRemembered: false |` failed: (404) Not Found");
"Service ticket request for `#CasRestProfile# | id: username | attributes: {} | roles: [] | permissions: [] | isRemembered: false |` failed: (404) Not Found");
}
}
Expand Up @@ -6,12 +6,12 @@
import static org.junit.Assert.*;

/**
* General test cases for HttpTGTProfile.
* General test cases for {@link CasRestProfile}.
*
* @author Jacob Severson
* @since 1.8.0
*/
public final class HttpTGTProfileTests implements TestsConstants {
public final class CasRestProfileTests implements TestsConstants {

@Test
public void testClearProfile() {
Expand Down
Expand Up @@ -58,7 +58,7 @@ protected void verifyProfile(CommonProfile userProfile) {
assertTrue(ProfileHelper.isTypedIdOf(profile.getTypedId(), DropBoxProfile.class));
assertTrue(CommonHelper.isNotBlank(profile.getAccessToken()));
assertCommonProfile(userProfile, null, null, null, "Test ScribeUP", null, Gender.UNSPECIFIED, Locale.FRENCH,
null, "https://db.tt/RvmZyvJa", null);
null, "https://db.tt/T0YkdWpF", null);
assertEquals(0L, profile.getShared().longValue());
assertEquals(1410412L, profile.getNormal().longValue());
assertEquals(2147483648L, profile.getQuota().longValue());
Expand Down
Expand Up @@ -80,7 +80,7 @@ protected void verifyProfile(final CommonProfile userProfile) {
assertTrue(ProfileHelper.isTypedIdOf(profile.getTypedId(), FacebookProfile.class));
assertTrue(CommonHelper.isNotBlank(profile.getAccessToken()));
assertCommonProfile(userProfile, null, "Jerome", "Testscribeup", "Jerome Testscribeup", null, Gender.MALE,
Locale.FRANCE, "https://scontent.xx.fbcdn.net/hprofile-xaf1/v/t1.0-1/c170.50.621.621/s50x50/550165_168023156660068_12755354_n.jpg?oh=",
Locale.FRANCE, "https://scontent.xx.fbcdn.net/v/t1.0-1/c170.50.621.621/s50x50/550165_168023156660068_12755354_n.jpg?oh=",
"https://www.facebook.com/app_scoped_user_id/771361542992890/", "New York, New York");
assertNull(profile.getMiddleName());
final List<FacebookObject> languages = profile.getLanguages();
Expand All @@ -103,7 +103,7 @@ protected void verifyProfile(final CommonProfile userProfile) {
assertEquals("New York, New York", profile.getLocationObject().getName());
assertEquals("Sans Opinion (desc)", profile.getPolitical());
final List<FacebookObject> favoriteAthletes = profile.getFavoriteAthletes();
assertEquals("Surfing", favoriteAthletes.get(0).getName());
assertEquals("Women's surfing", favoriteAthletes.get(0).getName());
final List<FacebookObject> favoriteTeams = profile.getFavoriteTeams();
assertEquals("Handball Féminin de France", favoriteTeams.get(0).getName());
assertEquals("citation", profile.getQuotes());
Expand Down
Expand Up @@ -91,7 +91,7 @@ protected void verifyProfile(CommonProfile userProfile) {
assertNull(profile.getShowAllInlineMedia());
assertEquals(0, profile.getStatusesCount().intValue());
assertEquals("Amsterdam", profile.getTimeZone());
assertEquals(3600, profile.getUtcOffset().intValue());
assertEquals(7200, profile.getUtcOffset().intValue());
assertFalse(profile.getVerified());
assertNotNull(profile.getAccessSecret());
assertEquals(37, profile.getAttributes().size());
Expand Down
Expand Up @@ -73,7 +73,7 @@ protected void verifyProfile(CommonProfile userProfile) {
final List<YahooAddress> addresses = profile.getAddresses();
assertEquals(2, addresses.size());
final YahooAddress address = addresses.get(0);
assertEquals(3, address.getId().intValue());
assertEquals(1, address.getId().intValue());
assertTrue(address.getCurrent());
assertEquals(Locale.FRENCH, address.getCountry());
assertEquals("", address.getState());
Expand All @@ -84,7 +84,7 @@ protected void verifyProfile(CommonProfile userProfile) {
assertEquals(1976, profile.getBirthYear().intValue());
assertEquals("03/10", profile.getBirthdate().toString());
assertEquals("2012-02-06T12:46:43Z", profile.getCreated().toString());
assertEquals(39, profile.getDisplayAge().intValue());
assertEquals(40, profile.getDisplayAge().intValue());
final List<YahooDisclosure> disclosures = profile.getDisclosures();
assertEquals(2, disclosures.size());
final YahooDisclosure disclosure = disclosures.get(0);
Expand All @@ -94,7 +94,7 @@ protected void verifyProfile(CommonProfile userProfile) {
final List<YahooEmail> emails = profile.getEmails();
assertEquals(2, emails.size());
final YahooEmail email = emails.get(1);
assertEquals(2, email.getId().intValue());
assertEquals(1, email.getId().intValue());
assertTrue(email.getPrimary());
assertEquals("testscribeup@yahoo.fr", email.getHandle());
assertEquals("HOME", email.getType());
Expand Down
Expand Up @@ -62,6 +62,6 @@ protected void verifyProfile(final CommonProfile userProfile) {
assertCommonProfile(userProfile, getLogin(), "Jérôme", "TESTPAC4J", "MyDisplayName", null,
Gender.UNSPECIFIED, null, null, null, null);
assertEquals("live.com", profile.getIdp());
assertEquals(10, profile.getAttributes().size());
assertEquals(11, profile.getAttributes().size());
}
}

0 comments on commit 71e91a8

Please sign in to comment.