added test for missing block delimiter case

This commit is contained in:
eeichinger
2009-11-28 19:44:07 +00:00
parent e4fd943c2c
commit e56b513964

View File

@@ -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()
{