public void ShouldWriteQueryForRemoveUserDefinedFunction() { var op = new RemoveUserDefinedFunctionOperation(SchemaName, FunctionName); const string expectedQuery = "drop function [schemaName].[functionName]"; Assert.AreEqual(expectedQuery, op.ToQuery()); }
public void ShouldSetPropertiesForRemoveUserDefinedFunction() { var op = new RemoveUserDefinedFunctionOperation(SchemaName, FunctionName); Assert.AreEqual(SchemaName, op.SchemaName); Assert.AreEqual(FunctionName, op.Name); Assert.That(op.ObjectName, Is.EqualTo(string.Format("{0}.{1}", SchemaName, FunctionName))); }
public void ShouldDisableWhenMergedWithRemoveOperation() { var op = new AddUserDefinedFunctionOperation("schema", "name", "definition"); var removeOp = new RemoveUserDefinedFunctionOperation("SCHEMA", "NAME"); op.Merge(removeOp); Assert.That(op.Disabled, Is.True); Assert.That(removeOp.Disabled, Is.True); }