Esempio n. 1
0
        public void UpdateTriggerName_WithValidDatabasePath_RenamesTriggerInSpecifiedDatabase()
        {
            MainTreeHandler.UpdateTriggerName("Trigger", "NewTrigger", DATABASEPATH1);

            var result = TreeSearcher.DatabaseHoldsItem <TriggerFolderItem>(testTree, "NewTrigger", DATABASEPATH1);

            Assert.IsTrue(result);
        }
Esempio n. 2
0
        public void UpdateTriggerName_WithValidDatabasePath_DatabaseDoesNotContainOldItemAnymore()
        {
            MainTreeHandler.UpdateTriggerName("Trigger", "NewTrigger", DATABASEPATH1);

            var result = TreeSearcher.DatabaseHoldsItem <TriggerFolderItem>(testTree, "Trigger", DATABASEPATH1);

            Assert.IsFalse(result);
        }
Esempio n. 3
0
 private void RenameTrigger()
 {
     using (var triggerHandler = new TriggerHandler(originalElement.DatabasePath))
     {
         triggerHandler.UpdateTriggerName(originalElement.DisplayName, NewName);
         MainTreeHandler.UpdateTriggerName(originalElement.DisplayName, NewName, originalElement.DatabasePath);
     }
 }
Esempio n. 4
0
 public void UpdateTriggerName_WithInvalidOldName_DoesNotThrowException()
 {
     Assert.DoesNotThrow(
         () => MainTreeHandler.UpdateTriggerName("InvalidOldName", "NewName", DATABASEPATH1));
 }