public void AddTest()
 {
     RolesProviderDataCollection collection =
         new RolesProviderDataCollection();
     Assert.AreEqual(0, collection.Count);
     MockRolesProviderData providerData =
         new MockRolesProviderData();
     providerData.Name = "provider1";
     collection.Add(providerData);
     Assert.AreEqual(1, collection.Count);
 }
        public void HydrateTest()
        {
            RolesProviderDataCollection dataCollection = new RolesProviderDataCollection();
            CustomRolesProviderData providerData = new CustomRolesProviderData();
            providerData.Name = "provider1";
            providerData.TypeName = typeof(MockRolesProvider).AssemblyQualifiedName;
            dataCollection.Add(providerData);

            RolesProviderCollectionNode node = new RolesProviderCollectionNode(dataCollection);
            CreateHierarchyAndAddToHierarchyService(node, CreateDefaultConfiguration());
            Assert.AreEqual(1, node.Nodes.Count);
        }
        public void AddTest()
        {
            RolesProviderDataCollection collection =
                new RolesProviderDataCollection();

            Assert.AreEqual(0, collection.Count);
            MockRolesProviderData providerData =
                new MockRolesProviderData();

            providerData.Name = "provider1";
            collection.Add(providerData);
            Assert.AreEqual(1, collection.Count);
        }
Exemplo n.º 4
0
        public void HydrateTest()
        {
            RolesProviderDataCollection dataCollection = new RolesProviderDataCollection();
            CustomRolesProviderData     providerData   = new CustomRolesProviderData();

            providerData.Name     = "provider1";
            providerData.TypeName = typeof(MockRolesProvider).AssemblyQualifiedName;
            dataCollection.Add(providerData);

            RolesProviderCollectionNode node = new RolesProviderCollectionNode(dataCollection);

            CreateHierarchyAndAddToHierarchyService(node, CreateDefaultConfiguration());
            Assert.AreEqual(1, node.Nodes.Count);
        }