public override void SetUp() { base.SetUp(); DatabaseSettingsNode databaseSettingsNode = new DatabaseSettingsNode(DatabaseSettingsBuilder.Create(Host)); IUIHierarchy hierarchy = CreateHierarchyAndAddToHierarchyService(databaseSettingsNode, CreateDefaultConfiguration()); packageNode = (OraclePackageNode)hierarchy.FindNodeByType(typeof(OraclePackageNode)); }
public override void SetUp() { base.SetUp(); DatabaseSettingsNode databaseSettingsNode = new DatabaseSettingsNode(DatabaseSettingsBuilder.Create(Host)); IUIHierarchy hierarchy = CreateHierarchyAndAddToHierarchyService(databaseSettingsNode, CreateDefaultConfiguration()); packageNode = (OraclePackageNode)hierarchy.FindNodeByType(typeof(OraclePackageNode)); }
public override void SetUp() { base.SetUp(); DatabaseSettings databaseSettings = DatabaseSettingsBuilder.Create(Host); databaseSettingsNode = new DatabaseSettingsNode(databaseSettings); GeneratedApplicationNode.Nodes.Add(databaseSettingsNode); databaseSettingsNode.ResolveNodeReferences(); }
public override void SetUp() { base.SetUp(); DatabaseSettings databaseSettings = DatabaseSettingsBuilder.Create(Host); DatabaseSettingsNode databaseSettingsNode = new DatabaseSettingsNode(databaseSettings); IUIHierarchy hierarchy = CreateHierarchyAndAddToHierarchyService(databaseSettingsNode, CreateDefaultConfiguration()); databaseTypeCollectionNode = (DatabaseTypeCollectionNode)hierarchy.FindNodeByType(typeof(DatabaseTypeCollectionNode)); }
public override void SetUp() { base.SetUp(); DatabaseSettings databaseSettings = DatabaseSettingsBuilder.Create(Host); databaseSettingsNode = new DatabaseSettingsNode(databaseSettings); GeneratedApplicationNode.Nodes.Add(databaseSettingsNode); databaseSettingsNode.ResolveNodeReferences(); }
public override void SetUp() { base.SetUp(); DatabaseSettings databaseSettings = DatabaseSettingsBuilder.Create(Host); DatabaseSettingsNode databaseSettingsNode = new DatabaseSettingsNode(databaseSettings); IUIHierarchy hierarchy = CreateHierarchyAndAddToHierarchyService(databaseSettingsNode, CreateDefaultConfiguration()); connectionStringCollectionNode = (ConnectionStringCollectionNode)hierarchy.FindNodeByType(typeof(ConnectionStringCollectionNode)); }
public override void SetUp() { base.SetUp(); DatabaseSettings databaseSettings = DatabaseSettingsBuilder.Create(Host); DatabaseSettingsNode databaseSettingsNode = new DatabaseSettingsNode(databaseSettings); IUIHierarchy hierarchy = CreateHierarchyAndAddToHierarchyService(databaseSettingsNode, CreateDefaultConfiguration()); databaseSettingsNode.ResolveNodeReferences(); instancesNode = (InstanceCollectionNode)hierarchy.FindNodeByType(typeof(InstanceCollectionNode)); }
/// <summary> /// Resolves the database node reference. /// </summary> public override void ResolveNodeReferences() { base.ResolveNodeReferences(); DatabaseSettingsNode databaseSettingsNode = Hierarchy.FindNodeByType(typeof(DatabaseSettingsNode)) as DatabaseSettingsNode; Debug.Assert(databaseSettingsNode != null, "How is it that the database settings are not there?"); InstanceCollectionNode instanceCollectionNode = Hierarchy.FindNodeByType(typeof(InstanceCollectionNode)) as InstanceCollectionNode; this.Database = Hierarchy.FindNodeByName(instanceCollectionNode, this.dbRolesProviderData.Database) as InstanceNode; }
public void CreateFromRuntimeTest() { DatabaseSettings databaseSettings = DatabaseSettingsBuilder.Create(Host); DatabaseSettingsNode databaseSettingsNode = new DatabaseSettingsNode(databaseSettings); IUIHierarchy hierarchy = CreateHierarchyAndAddToHierarchyService(databaseSettingsNode, CreateDefaultConfiguration()); ConnectionStringCollectionNode node = (ConnectionStringCollectionNode)hierarchy.FindNodeByType(typeof(ConnectionStringCollectionNode)); ValidateNodeCommand cmd = new ValidateNodeCommand(Host); cmd.Execute(node); Assert.AreEqual(0, ValidationErrorsCount); }
public void CreateFromRuntimeTest() { DatabaseSettings databaseSettings = DatabaseSettingsBuilder.Create(Host); DatabaseSettingsNode databaseSettingsNode = new DatabaseSettingsNode(databaseSettings); IUIHierarchy hierarchy = CreateHierarchyAndAddToHierarchyService(databaseSettingsNode, CreateDefaultConfiguration()); ConnectionStringCollectionNode node = (ConnectionStringCollectionNode)hierarchy.FindNodeByType(typeof(ConnectionStringCollectionNode)); ValidateNodeCommand cmd = new ValidateNodeCommand(Host); cmd.Execute(node); Assert.AreEqual(0, ValidationErrorsCount); }
public override void SetUp() { base.SetUp(); DatabaseSettings databaseSettings = DatabaseSettingsBuilder.Create(Host); DatabaseSettingsNode databaseSettingsNode = new DatabaseSettingsNode(databaseSettings); GeneratedApplicationNode.Nodes.Add(databaseSettingsNode); databaseSettingsNode.ResolveNodeReferences(); InstanceCollectionNode collectionNode = GeneratedHierarchy.FindNodeByType(typeof(InstanceCollectionNode)) as InstanceCollectionNode; instanceNode = GeneratedHierarchy.FindNodeByName(collectionNode, name) as InstanceNode; }
public override void SetUp() { base.SetUp(); DatabaseSettings databaseSettings = DatabaseSettingsBuilder.Create(Host); connectionStringData = databaseSettings.ConnectionStrings["OracleConnection"] as OracleConnectionStringData; Assert.IsNotNull(connectionStringData); DatabaseSettingsNode databaseSettingsNode = new DatabaseSettingsNode(databaseSettings); IUIHierarchy hierarchy = CreateHierarchyAndAddToHierarchyService(databaseSettingsNode, CreateDefaultConfiguration()); ConfigurationNode[] nodes = hierarchy.FindNodesByType(typeof(OracleConnectionStringNode)); foreach (OracleConnectionStringNode node in nodes) { connectionStringNode = node; } }
public override void SetUp() { base.SetUp(); DatabaseSettingsNode databaseSettingsNode = new DatabaseSettingsNode(DatabaseSettingsBuilder.Create(Host)); IUIHierarchy hierarchy = CreateHierarchyAndAddToHierarchyService(databaseSettingsNode, CreateDefaultConfiguration()); ConfigurationNode[] nodes = hierarchy.FindNodesByType(typeof(ParameterNode)); foreach (ParameterNode node in nodes) { if (node.Name == "server") { parameterNode = node; break; } } }
public void CreateFromRuntimeTest() { DatabaseSettings databaseSettings = DatabaseSettingsBuilder.Create(Host); DatabaseSettingsNode databaseSettingsNode = new DatabaseSettingsNode(databaseSettings); IUIHierarchy hierarchy = CreateHierarchyAndAddToHierarchyService(databaseSettingsNode, CreateDefaultConfiguration()); databaseSettingsNode.ResolveNodeReferences(); InstanceData data = databaseSettings.Instances[name]; InstanceCollectionNode collectionNode = hierarchy.FindNodeByType(typeof(InstanceCollectionNode)) as InstanceCollectionNode; InstanceNode node = hierarchy.FindNodeByName(collectionNode, name) as InstanceNode; Assert.AreEqual(data.Name, node.Name); Assert.AreEqual(data.DatabaseTypeName, node.DatabaseTypeName); ValidateNodeCommand cmd = new ValidateNodeCommand(Host); cmd.Execute(node); Assert.AreEqual(0, ValidationErrorsCount); }
public override void SetUp() { base.SetUp(); DatabaseSettings databaseSettings = DatabaseSettingsBuilder.Create(Host); connectionStringData = databaseSettings.ConnectionStrings["OracleConnection"] as OracleConnectionStringData; Assert.IsNotNull(connectionStringData); DatabaseSettingsNode databaseSettingsNode = new DatabaseSettingsNode(databaseSettings); IUIHierarchy hierarchy = CreateHierarchyAndAddToHierarchyService(databaseSettingsNode, CreateDefaultConfiguration()); ConfigurationNode[] nodes = hierarchy.FindNodesByType(typeof(OracleConnectionStringNode)); foreach (OracleConnectionStringNode node in nodes) { connectionStringNode = node; } }
public override void SetUp() { base.SetUp(); DatabaseSettingsNode databaseSettingsNode = new DatabaseSettingsNode(DatabaseSettingsBuilder.Create(Host)); IUIHierarchy hierarchy = CreateHierarchyAndAddToHierarchyService(databaseSettingsNode, CreateDefaultConfiguration()); ConfigurationNode[] nodes = hierarchy.FindNodesByType(typeof(ParameterNode)); foreach (ParameterNode node in nodes) { if (node.Name == "server") { parameterNode = node; break; } } }
public void CreateFromRuntimeTest() { DatabaseSettings databaseSettings = DatabaseSettingsBuilder.Create(Host); DatabaseSettingsNode databaseSettingsNode = new DatabaseSettingsNode(databaseSettings); IUIHierarchy hierarchy = CreateHierarchyAndAddToHierarchyService(databaseSettingsNode, CreateDefaultConfiguration()); databaseSettingsNode.ResolveNodeReferences(); InstanceData data = databaseSettings.Instances[name]; InstanceCollectionNode collectionNode = hierarchy.FindNodeByType(typeof(InstanceCollectionNode)) as InstanceCollectionNode; InstanceNode node = hierarchy.FindNodeByName(collectionNode, name) as InstanceNode; Assert.AreEqual(data.Name, node.Name); Assert.AreEqual(data.DatabaseTypeName, node.DatabaseTypeName); ValidateNodeCommand cmd = new ValidateNodeCommand(Host); cmd.Execute(node); Assert.AreEqual(0, ValidationErrorsCount); }
public void SaveDefaultAuthenticationProviderAndSaveAndReloadsCorrectly() { GeneratedHierarchy.Load(); AddConfigurationSectionCommand cmd = new AddConfigurationSectionCommand(Host, typeof(SecuritySettingsNode), SecuritySettings.SectionName); cmd.Execute(GeneratedApplicationNode); SecuritySettingsNode securitySettingsNode = GeneratedHierarchy.FindNodeByType(typeof(SecuritySettingsNode)) as SecuritySettingsNode; Assert.IsNotNull(securitySettingsNode); AuthenticationProviderCollectionNode authenticationProviderCollectionNode = GeneratedHierarchy.FindNodeByType(securitySettingsNode, typeof(AuthenticationProviderCollectionNode)) as AuthenticationProviderCollectionNode; Assert.IsNotNull(authenticationProviderCollectionNode); AddChildNodeCommand addChildNodeCommand = new AddChildNodeCommand(Host, typeof(DbAuthenticationProviderNode)); addChildNodeCommand.Execute(authenticationProviderCollectionNode); Assert.AreEqual(typeof(DbAuthenticationProviderNode), addChildNodeCommand.ChildNode.GetType()); DbAuthenticationProviderNode dbAuthenticationProviderNode = (DbAuthenticationProviderNode)addChildNodeCommand.ChildNode; securitySettingsNode.DefaultAuthenticationInstance = (AuthenticationProviderNode)addChildNodeCommand.ChildNode; addChildNodeCommand = new AddChildNodeCommand(Host, typeof(HashAlgorithmProviderNode)); CryptographySettingsNode cryptographySettingsNode = GeneratedHierarchy.FindNodeByType(typeof(CryptographySettingsNode)) as CryptographySettingsNode; Assert.IsNotNull(cryptographySettingsNode); HashProviderCollectionNode hashProviderCollectionNode = GeneratedHierarchy.FindNodeByType(typeof(HashProviderCollectionNode)) as HashProviderCollectionNode; Assert.IsNotNull(hashProviderCollectionNode); addChildNodeCommand.Execute(hashProviderCollectionNode); Assert.AreEqual(typeof(HashAlgorithmProviderNode), addChildNodeCommand.ChildNode.GetType()); dbAuthenticationProviderNode.HashProvider = (HashProviderNode)addChildNodeCommand.ChildNode; DatabaseSettingsNode databaseSettingsNode = GeneratedHierarchy.FindNodeByType(typeof(DatabaseSettingsNode)) as DatabaseSettingsNode; Assert.IsNotNull(databaseSettingsNode); InstanceCollectionNode instanceCollectionNode = GeneratedHierarchy.FindNodeByType(databaseSettingsNode, typeof(InstanceCollectionNode)) as InstanceCollectionNode; Assert.IsNotNull(instanceCollectionNode); Assert.IsTrue(instanceCollectionNode.Nodes.Count > 0); InstanceNode instanceNode = (InstanceNode)instanceCollectionNode.Nodes[0]; dbAuthenticationProviderNode.Database = instanceNode; ValidateNodeCommand validateNodeCommand = new ValidateNodeCommand(Host); validateNodeCommand.Execute(GeneratedApplicationNode); Assert.AreEqual(0, ConfigurationErrorsCount); SaveApplicationConfigurationNodeCommand saveCmd = new SaveApplicationConfigurationNodeCommand(Host); saveCmd.Execute(GeneratedApplicationNode); ApplicationConfigurationNode applicationConfigurationNode = new ApplicationConfigurationNode(ApplicationData.FromCurrentAppDomain()); IUIHierarchy hierarchy = CreateHierarchyAndAddToHierarchyService(applicationConfigurationNode, CreateDefaultConfiguration()); HierarchyService.SelectedHierarchy = hierarchy; hierarchy.Open(); }
private bool DatabaseSettingsNodeExists() { DatabaseSettingsNode node = Hierarchy.FindNodeByType(typeof(DatabaseSettingsNode)) as DatabaseSettingsNode; return(node != null); }
public override void SetUp() { base.SetUp(); DatabaseSettings databaseSettings = DatabaseSettingsBuilder.Create(Host); DatabaseSettingsNode databaseSettingsNode = new DatabaseSettingsNode(databaseSettings); GeneratedApplicationNode.Nodes.Add(databaseSettingsNode); databaseSettingsNode.ResolveNodeReferences(); InstanceCollectionNode collectionNode = GeneratedHierarchy.FindNodeByType(typeof(InstanceCollectionNode)) as InstanceCollectionNode; instanceNode = GeneratedHierarchy.FindNodeByName(collectionNode, name) as InstanceNode; }