Red Gate forums :: View topic - Instrumenting tests for failure conditions
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product support center
SQL Test
SQL Test forum

Instrumenting tests for failure conditions

Search in SQL Test forum
Post new topic   Reply to topic
Jump to:  
Author Message
alans



Joined: 09 May 2012
Posts: 2
Location: Calgary, AB, Canada

PostPosted: Wed May 09, 2012 10:21 pm    Post subject: Instrumenting tests for failure conditions Reply with quote

Hello,

I was wondering if anyone has written a test case where the desired outcome (i.e. the pass criteria) is for the procedure to fail.

I looked at the tSQLt Wiki on assertions, but they don't seem to have one that asserts that something has failed (which would be the pass condition)...

The procedure that I'm testing will call a RAISERROR (16, 1) when the failure condition is met.

Thanks,

Alan
Back to top
View user's profile Send private message
alans



Joined: 09 May 2012
Posts: 2
Location: Calgary, AB, Canada

PostPosted: Wed May 09, 2012 11:06 pm    Post subject: Reply with quote

Ah, nevermind. I just need to use a begin/end error block.

Thanks,

Alan
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group