Пример #1
0
        public void Split_GoMustBeAloneOnLine()
        {
            const string script = @"ABC GO DEF";
            var          parts  = ScriptSplitter.Split(script);

            CollectionAssert.AreEqual(new[] { "ABC GO DEF" }, parts);
        }
Пример #2
0
        public void Split_NoGO()
        {
            const string script = @"ABC
DEF";
            var          parts  = ScriptSplitter.Split(script);

            CollectionAssert.AreEqual(new [] { script }, parts);
        }
Пример #3
0
        public void Split_GoCanBeSurroundedByWhitespace()
        {
            const string script = @"ABC
  GO    
DEF";
            var          parts  = ScriptSplitter.Split(script);

            CollectionAssert.AreEqual(new[] { "ABC", "DEF" }, parts);
        }
Пример #4
0
        public void Split_CaseInsensitiveGO()
        {
            const string script = @"ABC
gO
DEF";
            var          parts  = ScriptSplitter.Split(script);

            CollectionAssert.AreEqual(new[] { "ABC", "DEF" }, parts);
        }
Пример #5
0
        public void Split_TwoParts()
        {
            const string script = @"ABC
GO
DEF";
            var          parts  = ScriptSplitter.Split(script);

            CollectionAssert.AreEqual(new[] { "ABC", "DEF" }, parts);
        }
Пример #6
0
        public void Split_LastPartIsEmpty()
        {
            const string script = @"ABC
GO
    ";
            var          parts  = ScriptSplitter.Split(script);

            CollectionAssert.AreEqual(new[] { "ABC" }, parts);
        }
Пример #7
0
        public void Split_MultilineParts()
        {
            const string script = @"ABC
DEF
GO
GHI
JKL";
            var          parts  = ScriptSplitter.Split(script);

            CollectionAssert.AreEqual(new[] { "ABC\r\nDEF", "GHI\r\nJKL" }, parts);
        }