public async Task Test_TraktUsersModule_GetUserProfile_With_OAuth_Enforced() { TraktClient client = TestUtility.GetOAuthMockClient(GET_USER_PROFILE_URI, PROFILE_JSON); client.Configuration.ForceAuthorization = true; TraktResponse <ITraktUser> response = await client.Users.GetUserProfileAsync(USERNAME); response.Should().NotBeNull(); response.IsSuccess.Should().BeTrue(); response.HasValue.Should().BeTrue(); response.Value.Should().NotBeNull(); ITraktUser responseValue = response.Value; responseValue.Username.Should().Be("sean"); responseValue.IsPrivate.Should().BeFalse(); responseValue.Name.Should().Be("Sean Rudford"); responseValue.IsVIP.Should().BeTrue(); responseValue.IsVIP_EP.Should().BeTrue(); responseValue.JoinedAt.Should().NotHaveValue(); responseValue.Location.Should().BeNullOrEmpty(); responseValue.About.Should().BeNullOrEmpty(); responseValue.Gender.Should().BeNullOrEmpty(); responseValue.Age.Should().NotHaveValue(); responseValue.Images.Should().BeNull(); }
public async Task Test_TraktUsersModule_GetUserProfile_With_ExtendedInfo() { TraktClient client = TestUtility.GetMockClient( $"{GET_USER_PROFILE_URI}?extended={EXTENDED_INFO}", PROFILE_JSON); TraktResponse <ITraktUser> response = await client.Users.GetUserProfileAsync(USERNAME, EXTENDED_INFO); response.Should().NotBeNull(); response.IsSuccess.Should().BeTrue(); response.HasValue.Should().BeTrue(); response.Value.Should().NotBeNull(); ITraktUser responseValue = response.Value; responseValue.Username.Should().Be("sean"); responseValue.IsPrivate.Should().BeFalse(); responseValue.Name.Should().Be("Sean Rudford"); responseValue.IsVIP.Should().BeTrue(); responseValue.IsVIP_EP.Should().BeTrue(); responseValue.JoinedAt.Should().NotHaveValue(); responseValue.Location.Should().BeNullOrEmpty(); responseValue.About.Should().BeNullOrEmpty(); responseValue.Gender.Should().BeNullOrEmpty(); responseValue.Age.Should().NotHaveValue(); responseValue.Images.Should().BeNull(); }
public Trakt(ITraktUser user) { _user = user; }