예제 #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;
        }
예제 #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;
       }
 }
예제 #3
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");
 }
예제 #4
0
 public void SetCustomProfileShouldSaveProfile([CoreDb]Db db, UserProfileProvider userProfileProvider, UserProfile userProfile, IDictionary<string, string> properties)
 {
     userProfileProvider.SetCustomProfile(userProfile, properties);
       userProfile.Received().Save();
 }
예제 #5
0
 public void GetCustomPropertiesShouldReturnEmptyProperties([CoreDb]Db db, [Content]ProfileTemplate template, DbItem profileItem, UserProfileProvider userProfileProvider, UserProfile userProfile)
 {
     userProfileProvider.GetCustomProperties(userProfile).Should().BeEmpty();
 }