public void ForUser_ShouldNotAllowEmptyValues() { Assert.Throws <ArgumentException>( () => ProfileId.ForUser(" ")); }
public void ForUser_ShouldCreateWithUserId(string value) { Assert.Equal(value, ProfileId.ForUser(value)); }
public void ForUser_ShouldThrow_WhenUserIdMatchesAnonymousId() { Assert.Throws <ArgumentException>( () => ProfileId.ForUser(ProfileId.AnonymousUserId)); }
public void ForUser_ShouldThrow_WhenUserIdMatchesServiceId() { Assert.Throws <ArgumentException>( () => ProfileId.ForUser(ProfileId.ServiceUserId)); }
/// <summary> /// Creates a new Profile from the User's Identity (from the access token). /// </summary> /// <param name="userId">Authenticated user's Identity.</param> private AuthenticatedProfile(string userId) { ProfileId = ProfileId.ForUser(userId); Type = ProfileType.User; }