public void HydrateTest() { SecurityCacheProviderDataCollection dataCollection = new SecurityCacheProviderDataCollection(); CustomSecurityCacheProviderData providerData = new CustomSecurityCacheProviderData(); providerData.Name = "provider1"; providerData.TypeName = typeof(MockSecurityCacheProvider).AssemblyQualifiedName; dataCollection.Add(providerData); SecurityCacheProviderCollectionNode node = new SecurityCacheProviderCollectionNode(dataCollection); CreateHierarchyAndAddToHierarchyService(node, CreateDefaultConfiguration()); Assert.AreEqual(1, node.Nodes.Count); }
public void HydrateTest() { SecurityCacheProviderDataCollection dataCollection = new SecurityCacheProviderDataCollection(); CustomSecurityCacheProviderData providerData = new CustomSecurityCacheProviderData(); providerData.Name = "provider1"; providerData.TypeName = typeof(MockSecurityCacheProvider).AssemblyQualifiedName; dataCollection.Add(providerData); SecurityCacheProviderCollectionNode node = new SecurityCacheProviderCollectionNode(dataCollection); CreateHierarchyAndAddToHierarchyService(node, CreateDefaultConfiguration()); Assert.AreEqual(1, node.Nodes.Count); }
public void GetSecurityCacheProvidersDataTest() { SecurityCacheProviderCollectionNode node = new SecurityCacheProviderCollectionNode(); CreateHierarchyAndAddToHierarchyService(node, CreateDefaultConfiguration()); CustomSecurityCacheProviderNode providerNode = new CustomSecurityCacheProviderNode(); node.Nodes.Add(providerNode); providerNode.Name = "provider1"; providerNode.TypeName = typeof(MockSecurityCacheProvider).AssemblyQualifiedName; SecurityCacheProviderDataCollection providers = node.SecurityCacheProviderDataCollection; Assert.IsNotNull(providers); Assert.AreEqual(1, providers.Count); SecurityCacheProviderData data = providers["provider1"]; Assert.IsNotNull(data); CustomSecurityCacheProviderData customData = data as CustomSecurityCacheProviderData; Assert.IsNotNull(customData); Assert.AreEqual(typeof(MockSecurityCacheProvider).AssemblyQualifiedName, customData.TypeName); }
/// <summary> /// Initializes a new instance of the /// <see cref="SecurityCacheProviderCollectionNode"/> /// class from the specified data. /// </summary> /// <param name="securityCacheProviderDataCollection">The configuration data for a security cache provider collection.</param> public SecurityCacheProviderCollectionNode(SecurityCacheProviderDataCollection securityCacheProviderDataCollection) : base() { this.securityCacheProviderDataCollection = securityCacheProviderDataCollection; }
/// <summary> /// Initializes a new instance of the /// <see cref="SecurityCacheProviderCollectionNode"/> /// class from the specified data. /// </summary> /// <param name="securityCacheProviderDataCollection">The configuration data for a security cache provider collection.</param> public SecurityCacheProviderCollectionNode(SecurityCacheProviderDataCollection securityCacheProviderDataCollection) : base() { this.securityCacheProviderDataCollection = securityCacheProviderDataCollection; }