Inheritance: IUserProfileProvider
Exemplo n.º 1
0
    public void SetCustomProfileShouldSetEmptyProperties([CoreDb]Db db, UserProfileProvider userProfileProvider, UserProfile userProfile, IDictionary<string, string> properties, string nullKey)
    {
      properties.Add(nullKey, null);

      userProfileProvider.SetCustomProfile(userProfile, properties);
      userProfile.Received()[nullKey] = string.Empty;
    }
Exemplo n.º 2
0
 public void SetCustomProfileShouldSetProperties([CoreDb]Db db, UserProfileProvider userProfileProvider, UserProfile userProfile, IDictionary<string,string> properties)
 {
   userProfileProvider.SetCustomProfile(userProfile, properties);
   foreach (var property in properties)
   {
     userProfile.Received()[property.Key] = property.Value;
   }
 }
Exemplo n.º 3
0
 public void SetCustomProfileShouldSaveProfile([CoreDb]Db db, UserProfileProvider userProfileProvider, UserProfile userProfile, IDictionary<string, string> properties)
 {
   userProfileProvider.SetCustomProfile(userProfile, properties);
   userProfile.Received().Save();
 }
Exemplo n.º 4
0
 public void GetCustomPropertiesShouldReturnEmptyProperties([CoreDb]Db db, [Content]ProfileTemplate template, DbItem profileItem, UserProfileProvider userProfileProvider, UserProfile userProfile)
 {
   userProfileProvider.GetCustomProperties(userProfile).Should().BeEmpty();
 }
Exemplo n.º 5
0
 public void GetCustomPropertiesShouldReturnProperties([CoreDb]Db db, [Content]ProfileTemplate template, [Content]DbItem profileItem, UserProfileProvider userProfileProvider, UserProfile userProfile)
 {
   userProfileProvider.GetCustomProperties(userProfile).Should().ContainKeys("FirstName", "LastName", "Phone");
 }