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 databaseSettingsNode = new DatabaseSettingsNode(databaseSettings);
            IUIHierarchy         hierarchy            = CreateHierarchyAndAddToHierarchyService(databaseSettingsNode, CreateDefaultConfiguration());

            databaseTypeCollectionNode = (DatabaseTypeCollectionNode)hierarchy.FindNodeByType(typeof(DatabaseTypeCollectionNode));
        }
 public void CreateFromRuntimeTest()
 {
     DatabaseSettings databaseSettings = DatabaseSettingsBuilder.Create(Host);
     DatabaseTypeCollectionNode node = new DatabaseTypeCollectionNode(databaseSettings.DatabaseTypes);
     CreateHierarchyAndAddToHierarchyService(node, CreateDefaultConfiguration());
     Assert.AreEqual(databaseSettings.DatabaseTypes.Count, node.Nodes.Count);
     ValidateNodeCommand cmd = new ValidateNodeCommand(Host);
     cmd.Execute(node);
     Assert.AreEqual(0, ValidationErrorsCount);
 }
        public void CreateFromRuntimeTest()
        {
            DatabaseSettings           databaseSettings = DatabaseSettingsBuilder.Create(Host);
            DatabaseTypeCollectionNode node             = new DatabaseTypeCollectionNode(databaseSettings.DatabaseTypes);

            CreateHierarchyAndAddToHierarchyService(node, CreateDefaultConfiguration());
            Assert.AreEqual(databaseSettings.DatabaseTypes.Count, node.Nodes.Count);
            ValidateNodeCommand cmd = new ValidateNodeCommand(Host);

            cmd.Execute(node);
            Assert.AreEqual(0, ValidationErrorsCount);
        }
示例#5
0
        public void NewDatabaseTypeNodeTest()
        {
            IUIHierarchy               hierarchy                  = HierarchyService.SelectedHierarchy;
            InstanceCollectionNode     collectionNode             = hierarchy.FindNodeByType(typeof(InstanceCollectionNode)) as InstanceCollectionNode;
            InstanceNode               localInstanceNode          = hierarchy.FindNodeByName(collectionNode, name) as InstanceNode;
            DatabaseTypeCollectionNode databaseTypeCollectionNode = hierarchy.FindNodeByType(typeof(DatabaseTypeCollectionNode)) as DatabaseTypeCollectionNode;
            DatabaseTypeNode           databaseTypeNode           = hierarchy.FindNodeByName(databaseTypeCollectionNode, "SqlServer") as DatabaseTypeNode;

            localInstanceNode.DatabaseTypeNode = databaseTypeNode;
            Assert.AreEqual(databaseTypeNode.Name, localInstanceNode.DatabaseTypeName);
            databaseTypeNode.Name = "newName";
            Assert.AreEqual(databaseTypeNode.Name, localInstanceNode.DatabaseTypeName);
            databaseTypeNode.Remove();
            Assert.IsNull(localInstanceNode.DatabaseTypeNode);
        }
        public void DatabaseTypesNodeTest()
        {
            DatabaseTypeCollectionNode node = HierarchyService.SelectedHierarchy.FindNodeByType(databaseSettingsNode, typeof(DatabaseTypeCollectionNode)) as DatabaseTypeCollectionNode;

            Assert.IsNotNull(node);
        }