From e56b513964ce1d0fbe4494c176e5c86e49448dbe Mon Sep 17 00:00:00 2001 From: eeichinger Date: Sat, 28 Nov 2009 19:44:07 +0000 Subject: [PATCH] added test for missing block delimiter case --- .../Testing/Ado/SimpleAdoTestUtilsTests.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/Spring/Spring.Testing.NUnit.Tests/Testing/Ado/SimpleAdoTestUtilsTests.cs b/test/Spring/Spring.Testing.NUnit.Tests/Testing/Ado/SimpleAdoTestUtilsTests.cs index c213a293..2f1edfa0 100644 --- a/test/Spring/Spring.Testing.NUnit.Tests/Testing/Ado/SimpleAdoTestUtilsTests.cs +++ b/test/Spring/Spring.Testing.NUnit.Tests/Testing/Ado/SimpleAdoTestUtilsTests.cs @@ -68,6 +68,19 @@ namespace Spring.Testing.Ado mocks.VerifyAll(); } + [Test] + public void ExecuteScriptWithMissingSeparatorOnLastBlock() + { + IResource scriptResource = new StringResource("\tstatement 1 \n\n\t GO\t \n statement 2"); + + Expect.Call(adoTemplate.ExecuteNonQuery(CommandType.Text, "\tstatement 1 \n")).Return(0); + Expect.Call(adoTemplate.ExecuteNonQuery(CommandType.Text, "\n statement 2")).Return(0); + mocks.ReplayAll(); + + SimpleAdoTestUtils.ExecuteSqlScript(adoTemplate, scriptResource, false, SimpleAdoTestUtils.BLOCKDELIM_GO_EXP); + mocks.VerifyAll(); + } + [Test] public void ExecuteScriptWithGOBlocks() {