public void ShouldWriteQueryForRemoveTrigger() { var op = new RemoveTriggerOperation(SchemaName, TriggerName); const string expectedQuery = "drop trigger [schemaName].[triggerName]"; Assert.AreEqual(expectedQuery, op.ToQuery()); }
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))); }
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); }