public static void RenameTo()
        {
            var statement = new AlterTriggerStatement(ObjectName.Parse("APP.trig1"), new RenameTriggerAction(ObjectName.Parse("APP.trig1_bak")));

            var expected = "ALTER TRIGGER APP.trig1 RENAME TO APP.trig1_bak";
            Assert.AreEqual(expected, statement.ToString());
        }
        public static void Enable()
        {
            var statement = new AlterTriggerStatement(ObjectName.Parse("APP.trig2"), new ChangeTriggerStatusAction(TriggerStatus.Enabled));

            var expected = "ALTER TRIGGER APP.trig2 ENABLE";
            Assert.AreEqual(expected, statement.ToString());
        }
        public static void Disable()
        {
            var statement = new AlterTriggerStatement(ObjectName.Parse("APP.trig2"), new ChangeTriggerStatusAction(TriggerStatus.Disabled));

            var expected = "ALTER TRIGGER APP.trig2 DISABLE";

            Assert.AreEqual(expected, statement.ToString());
        }
        public static void RenameTo()
        {
            var statement = new AlterTriggerStatement(ObjectName.Parse("APP.trig1"), new RenameTriggerAction(ObjectName.Parse("APP.trig1_bak")));

            var expected = "ALTER TRIGGER APP.trig1 RENAME TO APP.trig1_bak";

            Assert.AreEqual(expected, statement.ToString());
        }
        public void AlterTrigger_RenameTo()
        {
            var statement = new AlterTriggerStatement(ObjectName.Parse("trig1"), new RenameTriggerAction(new ObjectName("t1")));

            SerializeAndAssert(statement, (serialized, deserialized) => {
                Assert.IsNotNull(deserialized);
                Assert.IsNotNull(deserialized.TriggerName);
                Assert.AreEqual("trig1", deserialized.TriggerName.FullName);
                Assert.IsInstanceOf<RenameTriggerAction>(deserialized.Action);
            });
        }
        public void AlterTrigger_ChangeStatus()
        {
            var statement = new AlterTriggerStatement(ObjectName.Parse("APP.trig1"), new ChangeTriggerStatusAction(TriggerStatus.Disabled));

            SerializeAndAssert(statement, (serialized, deserialized) => {
                Assert.IsNotNull(deserialized);
                Assert.IsNotNull(deserialized.TriggerName);
                Assert.AreEqual("APP.trig1", deserialized.TriggerName.FullName);
                Assert.IsInstanceOf<ChangeTriggerStatusAction>(deserialized.Action);
            });
        }