Beispiel #1
0
        public void Creation()
        {
            var TempCheckConstraint = new CreateFunctionCommandBuilder(ObjectPool);

            Assert.NotNull(TempCheckConstraint);
            Assert.Equal(40, TempCheckConstraint.Order);
        }
Beispiel #2
0
        public void GetCommandsNoCurrentSource()
        {
            var TempCheckConstraint = new CreateFunctionCommandBuilder(ObjectPool);
            var Commands            = TempCheckConstraint.GetCommands(DesiredSource, null).ToList();

            Assert.Single(Commands);
            Assert.Equal("My Definition 2", Commands[0]);
        }
Beispiel #3
0
        public void GetCommandsWithCurrentSource()
        {
            var TempCheckConstraint = new CreateFunctionCommandBuilder(ObjectPool);
            var Commands            = TempCheckConstraint.GetCommands(DesiredSource, CurrentSource).ToList();

            Assert.Equal(2, Commands.Count);
            Assert.Equal("DROP FUNCTION [dbo].[Function A]", Commands[0]);
            Assert.Equal("My Definition 2", Commands[1]);
        }