Beispiel #1
0
        public void FormatScriptDoesNotAddGoForEmptyStringScripts()
        {
            string script = string.Empty;
            string result = SchemaCompareOperation.FormatScript(script);

            Assert.DoesNotContain("GO", result);
            Assert.Equal(string.Empty, result);
        }
Beispiel #2
0
        public void FormatScriptAddsGo()
        {
            string script = "EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Primary key for AWBuildVersion records.', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'AWBuildVersion', @level2type = N'COLUMN', @level2name = N'SystemInformationID';";

            Assert.DoesNotContain("GO", script);
            string result = SchemaCompareOperation.FormatScript(script);

            Assert.EndsWith("GO", result);
        }
Beispiel #3
0
        public void FormatScriptDoesNotAddGoForWhitespaceStringScripts()
        {
            string script = "    \t\n";

            Assert.True(string.IsNullOrWhiteSpace(script));
            string result = SchemaCompareOperation.FormatScript(script);

            Assert.DoesNotContain("GO", result);
            Assert.Equal(string.Empty, result);
        }
Beispiel #4
0
        public void FormatScriptDoesNotAddGoForNullScripts()
        {
            string script1 = null;
            string result1 = SchemaCompareOperation.FormatScript(script1);

            Assert.DoesNotContain("GO", result1);
            Assert.Equal(null, result1);

            string script2 = "null";
            string result2 = SchemaCompareOperation.FormatScript(script2);

            Assert.DoesNotContain("GO", result2);
        }