Esempio n. 1
0
        public void ShouldWriteQueryForRemoveTrigger()
        {
            var          op            = new RemoveTriggerOperation(SchemaName, TriggerName);
            const string expectedQuery = "drop trigger [schemaName].[triggerName]";

            Assert.AreEqual(expectedQuery, op.ToQuery());
        }
Esempio n. 2
0
        public void ShouldSetPropertiesForRemoveTrigger()
        {
            var op = new RemoveTriggerOperation(SchemaName, TriggerName);

            Assert.AreEqual(SchemaName, op.SchemaName);
            Assert.AreEqual(TriggerName, op.Name);
            Assert.That(op.ObjectName, Is.EqualTo(string.Format("{0}.{1}", SchemaName, TriggerName)));
        }
Esempio n. 3
0
        public void ShouldDisableWhenMergedWithRemoveOperation()
        {
            var op       = new AddTriggerOperation("schema", "name", "definition");
            var removeOp = new RemoveTriggerOperation("SCHEMA", "NAME");

            op.Merge(removeOp);
            Assert.That(op.Disabled, Is.True);
            Assert.That(removeOp.Disabled, Is.True);
        }