forked from tSQLt-org/tSQLt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestCaseTemplate.sql
More file actions
22 lines (19 loc) · 975 Bytes
/
TestCaseTemplate.sql
File metadata and controls
22 lines (19 loc) · 975 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
-- Comments here are associated with the test.
-- For test case examples, see: http://tsqlt.org/user-guide/tsqlt-tutorial/
CREATE PROCEDURE [<Test_Class,sysname,>].[<Test_Name,sysname,test >]
AS
BEGIN
--Assemble
-- This section is for code that sets up the environment. It often
-- contains calls to methods such as tSQLt.FakeTable and tSQLt.SpyProcedure
-- along with INSERTs of relevant data.
-- For more information, see http://tsqlt.org/user-guide/isolating-dependencies/
--Act
-- Execute the code under test like a stored procedure, function or view
-- and capture the results in variables or tables.
--Assert
-- Compare the expected and actual values, or call tSQLt.Fail in an IF statement.
-- Example Asserts: tSQLt.AssertEquals, tSQLt.AssertEqualsString, tSQLt.AssertEqualsTable
-- For a complete list, see: http://tsqlt.org/user-guide/assertions/
EXEC tSQLt.Fail 'TODO:Implement this test.'
END;