diff --git a/Snippets/ReadMe.txt b/Snippets/README.md similarity index 77% rename from Snippets/ReadMe.txt rename to Snippets/README.md index 03595a672..b41f4b1cc 100644 --- a/Snippets/ReadMe.txt +++ b/Snippets/README.md @@ -1,8 +1,10 @@ -This zip file contains a set of SQL Prompt snippets for use with Red Gate SQL Prompt. - -Red Gate SQL Prompt is not part of tSQLt and not required to use tSQLt. -You can get it here:http://www.red-gate.com/products/sql-development/sql-prompt/ - -To install the tSQLt snippets, unzip this zip file into the SQL Prompt Snippet Directory. -This directory is usually located in "AppData\Local\Red Gate\SQL Prompt 6\Snippets" +# SQL Prompt Snippets + +This zip file contains a set of SQL Prompt snippets for use with Red Gate SQL Prompt. + +Red Gate SQL Prompt is not part of tSQLt and not required to use tSQLt. +You can get it here:http://www.red-gate.com/products/sql-development/sql-prompt/ + +To install the tSQLt snippets, unzip this zip file into the SQL Prompt Snippet Directory. +This directory is usually located in `%localappdata%\Red Gate\SQL Prompt *\Snippets` under your local user directory. \ No newline at end of file diff --git a/Snippets/Snippets.ssmssqlproj b/Snippets/Snippets.ssmssqlproj deleted file mode 100644 index c441bd374..000000000 --- a/Snippets/Snippets.ssmssqlproj +++ /dev/null @@ -1,250 +0,0 @@ - - - - - - - - - - - - - snippets.sql - - - - - - - - - - ReadMe.txt - - - - - - ida.sqlpromptsnippet - - - - - - idf.sqlpromptsnippet - - - - - - idl.sqlpromptsnippet - - - - - - idp.sqlpromptsnippet - - - - - - ids.sqlpromptsnippet - - - - - - idt.sqlpromptsnippet - - - - - - idtr.sqlpromptsnippet - - - - - - idu.sqlpromptsnippet - - - - - - idv.sqlpromptsnippet - - - - - - tab.sqlpromptsnippet - - - - - - tac.sqlpromptsnippet - - - - - - tal.sqlpromptsnippet - - - - - - tat.sqlpromptsnippet - - - - - - tca.sqlpromptsnippet - - - - - - tce.sqlpromptsnippet - - - - - - tco.sqlpromptsnippet - - - - - - tct.sqlpromptsnippet - - - - - - te.sqlpromptsnippet - - - - - - tes.sqlpromptsnippet - - - - - - tet.sqlpromptsnippet - - - - - - tf.sqlpromptsnippet - - - - - - tff.sqlpromptsnippet - - - - - - tft.sqlpromptsnippet - - - - - - tie.sqlpromptsnippet - - - - - - tmt.sqlpromptsnippet - - - - - - tnc.sqlpromptsnippet - - - - - - tne.sqlpromptsnippet - - - - - - tnt.sqlpromptsnippet - - - - - - toe.sqlpromptsnippet - - - - - - tpc.sqlpromptsnippet - - - - - - trf.sqlpromptsnippet - - - - - - tro.sqlpromptsnippet - - - - - - tso.sqlpromptsnippet - - - - - - tsp.sqlpromptsnippet - - - - - - txe.sqlpromptsnippet - - - - - - txn.sqlpromptsnippet - - - - - - txp.sqlpromptsnippet - - - - - \ No newline at end of file diff --git a/Snippets/ida-f345a432-8e6b-4d35-bfc5-dd037df27c15.json b/Snippets/ida-f345a432-8e6b-4d35-bfc5-dd037df27c15.json new file mode 100644 index 000000000..5f6c2cd88 --- /dev/null +++ b/Snippets/ida-f345a432-8e6b-4d35-bfc5-dd037df27c15.json @@ -0,0 +1,6 @@ +{ + "id": "f345a432-8e6b-4d35-bfc5-dd037df27c15", + "prefix": "ida", + "description": "IF EXISTS DROP: Assembly - [provided by @sqlity]", + "body": "IF ASSEMBLYPROPERTY('$CURSOR$','CLRName') IS NOT NULL DROP ASSEMBLY ;" +} \ No newline at end of file diff --git a/Snippets/ida.sqlpromptsnippet b/Snippets/ida.sqlpromptsnippet deleted file mode 100644 index e8a5c88c2..000000000 Binary files a/Snippets/ida.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/idf-0a7ab066-938a-4b14-8737-c86af501a7cc.json b/Snippets/idf-0a7ab066-938a-4b14-8737-c86af501a7cc.json new file mode 100644 index 000000000..34b347978 --- /dev/null +++ b/Snippets/idf-0a7ab066-938a-4b14-8737-c86af501a7cc.json @@ -0,0 +1,6 @@ +{ + "id": "0a7ab066-938a-4b14-8737-c86af501a7cc", + "prefix": "idf", + "description": "IF EXISTS DROP: Function - [provided by @sqlity]", + "body": "IF OBJECT_ID('$CURSOR$') IS NOT NULL DROP FUNCTION ;\nGO\n" +} \ No newline at end of file diff --git a/Snippets/idf.sqlpromptsnippet b/Snippets/idf.sqlpromptsnippet deleted file mode 100644 index 590a7ce49..000000000 Binary files a/Snippets/idf.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/idl-6ec31ee9-825a-41ff-8b7f-3631742e438d.json b/Snippets/idl-6ec31ee9-825a-41ff-8b7f-3631742e438d.json new file mode 100644 index 000000000..f3c3c71c3 --- /dev/null +++ b/Snippets/idl-6ec31ee9-825a-41ff-8b7f-3631742e438d.json @@ -0,0 +1,6 @@ +{ + "id": "6ec31ee9-825a-41ff-8b7f-3631742e438d", + "prefix": "idl", + "description": "IF EXISTS DROP: Login - [provided by @sqlity]", + "body": "IF SUSER_SID('$CURSOR$') IS NOT NULL DROP LOGIN ;" +} \ No newline at end of file diff --git a/Snippets/idl.sqlpromptsnippet b/Snippets/idl.sqlpromptsnippet deleted file mode 100644 index a58471e53..000000000 Binary files a/Snippets/idl.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/idp-64e12dc7-3127-44aa-9c6f-b4654df45d4b.json b/Snippets/idp-64e12dc7-3127-44aa-9c6f-b4654df45d4b.json new file mode 100644 index 000000000..e74db3749 --- /dev/null +++ b/Snippets/idp-64e12dc7-3127-44aa-9c6f-b4654df45d4b.json @@ -0,0 +1,6 @@ +{ + "id": "64e12dc7-3127-44aa-9c6f-b4654df45d4b", + "prefix": "idp", + "description": "IF EXISTS DROP: Procedure - [provided by @sqlity]", + "body": "IF OBJECT_ID('$CURSOR$') IS NOT NULL DROP PROCEDURE ;\nGO\n" +} \ No newline at end of file diff --git a/Snippets/idp.sqlpromptsnippet b/Snippets/idp.sqlpromptsnippet deleted file mode 100644 index b7db938a2..000000000 Binary files a/Snippets/idp.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/ids-519e7ad1-caef-46bc-a16f-439adf762cad.json b/Snippets/ids-519e7ad1-caef-46bc-a16f-439adf762cad.json new file mode 100644 index 000000000..7e4cf2eeb --- /dev/null +++ b/Snippets/ids-519e7ad1-caef-46bc-a16f-439adf762cad.json @@ -0,0 +1,6 @@ +{ + "id": "519e7ad1-caef-46bc-a16f-439adf762cad", + "prefix": "ids", + "description": "IF EXISTS DROP: Synonym - [provided by @sqlity]", + "body": "IF OBJECT_ID('$CURSOR$') IS NOT NULL DROP SYNONYM ;" +} \ No newline at end of file diff --git a/Snippets/ids.sqlpromptsnippet b/Snippets/ids.sqlpromptsnippet deleted file mode 100644 index 4e6ec86b8..000000000 Binary files a/Snippets/ids.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/idt-b5b03738-987b-4049-91fa-7d78c298e7e1.json b/Snippets/idt-b5b03738-987b-4049-91fa-7d78c298e7e1.json new file mode 100644 index 000000000..ce18e58e6 --- /dev/null +++ b/Snippets/idt-b5b03738-987b-4049-91fa-7d78c298e7e1.json @@ -0,0 +1,6 @@ +{ + "id": "b5b03738-987b-4049-91fa-7d78c298e7e1", + "prefix": "idt", + "description": "IF EXISTS DROP: Table - [provided by @sqlity]", + "body": "IF OBJECT_ID('$CURSOR$') IS NOT NULL DROP TABLE ;" +} \ No newline at end of file diff --git a/Snippets/idt.sqlpromptsnippet b/Snippets/idt.sqlpromptsnippet deleted file mode 100644 index c87edd5b8..000000000 Binary files a/Snippets/idt.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/idtr-801c48e6-6fa3-4313-aa39-3c6f1957606a.json b/Snippets/idtr-801c48e6-6fa3-4313-aa39-3c6f1957606a.json new file mode 100644 index 000000000..cda582c0e --- /dev/null +++ b/Snippets/idtr-801c48e6-6fa3-4313-aa39-3c6f1957606a.json @@ -0,0 +1,6 @@ +{ + "id": "801c48e6-6fa3-4313-aa39-3c6f1957606a", + "prefix": "idtr", + "description": "IF EXISTS DROP: Trigger - [provided by @sqlity]", + "body": "IF OBJECT_ID('$CURSOR$') IS NOT NULL DROP TRIGGER ;\nGO\n" +} \ No newline at end of file diff --git a/Snippets/idtr.sqlpromptsnippet b/Snippets/idtr.sqlpromptsnippet deleted file mode 100644 index 606daa2b2..000000000 Binary files a/Snippets/idtr.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/idu-f2efaf3b-c1ac-4b6c-b74d-afb0d5e3c20c.json b/Snippets/idu-f2efaf3b-c1ac-4b6c-b74d-afb0d5e3c20c.json new file mode 100644 index 000000000..1f3d704e1 --- /dev/null +++ b/Snippets/idu-f2efaf3b-c1ac-4b6c-b74d-afb0d5e3c20c.json @@ -0,0 +1,6 @@ +{ + "id": "f2efaf3b-c1ac-4b6c-b74d-afb0d5e3c20c", + "prefix": "idu", + "description": "IF EXISTS DROP: User - [provided by @sqlity]", + "body": "IF USER_ID('$CURSOR$') IS NOT NULL DROP USER ;" +} \ No newline at end of file diff --git a/Snippets/idu.sqlpromptsnippet b/Snippets/idu.sqlpromptsnippet deleted file mode 100644 index efcb093d1..000000000 Binary files a/Snippets/idu.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/idv-678ed497-bed1-4917-8ca7-381f66fb7c10.json b/Snippets/idv-678ed497-bed1-4917-8ca7-381f66fb7c10.json new file mode 100644 index 000000000..6c55ae43b --- /dev/null +++ b/Snippets/idv-678ed497-bed1-4917-8ca7-381f66fb7c10.json @@ -0,0 +1,6 @@ +{ + "id": "678ed497-bed1-4917-8ca7-381f66fb7c10", + "prefix": "idv", + "description": "IF EXISTS DROP: View - [provided by @sqlity]", + "body": "IF OBJECT_ID('$CURSOR$') IS NOT NULL DROP VIEW ;\nGO\n" +} \ No newline at end of file diff --git a/Snippets/idv.sqlpromptsnippet b/Snippets/idv.sqlpromptsnippet deleted file mode 100644 index efc5bb1f1..000000000 Binary files a/Snippets/idv.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/tab-79648b3c-3560-4c13-9057-9da7cd13ce0c.json b/Snippets/tab-79648b3c-3560-4c13-9057-9da7cd13ce0c.json new file mode 100644 index 000000000..42db5020d --- /dev/null +++ b/Snippets/tab-79648b3c-3560-4c13-9057-9da7cd13ce0c.json @@ -0,0 +1,6 @@ +{ + "id": "79648b3c-3560-4c13-9057-9da7cd13ce0c", + "prefix": "tab", + "description": "tSQLt: about [tSQLt - Database Unit Testing for SQL Server. Get it at http://tsqlt.org]", + "body": "/*\n -----------------\n -- About tSQLt --\n -----------------\n\ntSQLt is an open source unit testing framework for SQL Server. \ntSQLt is coauthored by:\n- Dennis Lloyd Jr. ( @dennislloydjr | http://curiouslycorrect.com/ )\n- Sebastian Meine ( @sqlity | http://sqlity.net )\n\nYou can download tSQLt at http://tSQLt.org/downloads\nA more complete set of SQL Prompt snippets is available there too.\n\ntSQLt provides an array of procedures that help you to write robust test cases\nby isolating dependencies (e.g. tSQLt.FakeTable or tSQLt.SpyProcedure) and \nasserting correct behavior (e.g. tSQLt.AssertEqualsTable or tSQLt.ExpectException).\n\nTo create a test, you first need to create a schema using the tSQLt.NewTextClass\nprocedure. Any procedure that lives in such a schema and that has a name that \nbegins with the four letters \"test\" is considdered a test case. To execute a test\njust run tSQLt.Run passing in either the schema name or the fully qualified\ntest case name. To execute all test cases in the database run tSQLt.RunAll\n\nYou can find the tSQLt manual and examples at http://tsqlt.org/user-guide/\n\nTo check the version of tSQLt that is currently installed execute this query:\nSELECT * FROM tSQLt.Info();\nThe Version and the ClrVersion should always match.\n\nFor an easier way to manage and execute your tests check out Red Gate SQL Test.\n\nBelow is a test case template that also explains the three parts that every \ntest should contain.\n*/\nGO\n-- Comments here are associated with the test.\n-- For test case examples, see: http://tsqlt.org/user-guide/tsqlt-tutorial/\nCREATE PROCEDURE [].[]\nAS\nBEGIN\n --Assemble\n -- This section is for code that sets up the environment. It often\n -- contains calls to methods such as tSQLt.FakeTable and tSQLt.SpyProcedure\n -- along with INSERTs of relevant data.\n -- For more information, see http://tsqlt.org/user-guide/isolating-dependencies/\n \n --Act\n -- Execute the code under test like a stored procedure, function or view\n -- and capture the results in variables or tables.\n \n --Assert\n -- Compare the expected and actual values, or call tSQLt.Fail in an IF statement. \n -- Typical Asserts: tSQLt.AssertEquals, tSQLt.AssertEqualsString, tSQLt.AssertEqualsTable\n -- For a complete list, see: http://tsqlt.org/user-guide/assertions/\n EXEC tSQLt.Fail 'TODO:Implement this test.'\n \nEND;\nGO\n\n" +} \ No newline at end of file diff --git a/Snippets/tab.sqlpromptsnippet b/Snippets/tab.sqlpromptsnippet deleted file mode 100644 index ece259946..000000000 Binary files a/Snippets/tab.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/tac-747cd3ce-14d7-473e-a42b-28418b597e89.json b/Snippets/tac-747cd3ce-14d7-473e-a42b-28418b597e89.json new file mode 100644 index 000000000..15b2feef5 --- /dev/null +++ b/Snippets/tac-747cd3ce-14d7-473e-a42b-28418b597e89.json @@ -0,0 +1,6 @@ +{ + "id": "747cd3ce-14d7-473e-a42b-28418b597e89", + "prefix": "tac", + "description": "tSQLt.ApplyConstraint [tSQLt - Database Unit Testing for SQL Server. Get it at http://tsqlt.org]", + "body": "EXEC tSQLt.ApplyConstraint @TableName = '$CURSOR$', @ConstraintName = '';" +} \ No newline at end of file diff --git a/Snippets/tac.sqlpromptsnippet b/Snippets/tac.sqlpromptsnippet deleted file mode 100644 index 22f73ab92..000000000 Binary files a/Snippets/tac.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/tal-3e910591-b3d5-4f2d-9153-4d20b2f65656.json b/Snippets/tal-3e910591-b3d5-4f2d-9153-4d20b2f65656.json new file mode 100644 index 000000000..8d46ff1e2 --- /dev/null +++ b/Snippets/tal-3e910591-b3d5-4f2d-9153-4d20b2f65656.json @@ -0,0 +1,6 @@ +{ + "id": "3e910591-b3d5-4f2d-9153-4d20b2f65656", + "prefix": "tal", + "description": "tSQLt.AssertLike [tSQLt - Database Unit Testing for SQL Server. Get it at http://tsqlt.org]", + "body": "EXEC tSQLt.AssertLike @ExpectedPattern = '$CURSOR$', @Actual;" +} \ No newline at end of file diff --git a/Snippets/tal.sqlpromptsnippet b/Snippets/tal.sqlpromptsnippet deleted file mode 100644 index b2e18e162..000000000 Binary files a/Snippets/tal.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/tat-16d83281-6d7e-4327-81fc-75fefce996a3.json b/Snippets/tat-16d83281-6d7e-4327-81fc-75fefce996a3.json new file mode 100644 index 000000000..35a010829 --- /dev/null +++ b/Snippets/tat-16d83281-6d7e-4327-81fc-75fefce996a3.json @@ -0,0 +1,6 @@ +{ + "id": "16d83281-6d7e-4327-81fc-75fefce996a3", + "prefix": "tat", + "description": "tSQLt.ApplyTrigger [tSQLt - Database Unit Testing for SQL Server. Get it at http://tsqlt.org]", + "body": "EXEC tSQLt.ApplyTrigger @TableName = '$CURSOR$', @TriggerName = '';" +} \ No newline at end of file diff --git a/Snippets/tat.sqlpromptsnippet b/Snippets/tat.sqlpromptsnippet deleted file mode 100644 index 2f1f7e8ac..000000000 Binary files a/Snippets/tat.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/tca-518a2895-ef22-4f49-a3ab-4a9807475509.json b/Snippets/tca-518a2895-ef22-4f49-a3ab-4a9807475509.json new file mode 100644 index 000000000..09ae05ccc --- /dev/null +++ b/Snippets/tca-518a2895-ef22-4f49-a3ab-4a9807475509.json @@ -0,0 +1,6 @@ +{ + "id": "518a2895-ef22-4f49-a3ab-4a9807475509", + "prefix": "tca", + "description": "tSQLt: SELECT INTO #Actual; [tSQLt - Database Unit Testing for SQL Server. Get it at http://tsqlt.org]", + "body": "SELECT *\nINTO #Actual\nFROM $CURSOR$;\n" +} \ No newline at end of file diff --git a/Snippets/tca.sqlpromptsnippet b/Snippets/tca.sqlpromptsnippet deleted file mode 100644 index c5cd54254..000000000 Binary files a/Snippets/tca.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/tce-df75f607-20c5-474d-bb43-a7dea61b0dbb.json b/Snippets/tce-df75f607-20c5-474d-bb43-a7dea61b0dbb.json new file mode 100644 index 000000000..7c6b7a7cb --- /dev/null +++ b/Snippets/tce-df75f607-20c5-474d-bb43-a7dea61b0dbb.json @@ -0,0 +1,6 @@ +{ + "id": "df75f607-20c5-474d-bb43-a7dea61b0dbb", + "prefix": "tce", + "description": "tSQLt: create #Expected from #Actual [tSQLt - Database Unit Testing for SQL Server. Get it at http://tsqlt.org]", + "body": "SELECT TOP(0) A.* INTO #Expected FROM #Actual A RIGHT JOIN #Actual X ON 1=0;\n" +} \ No newline at end of file diff --git a/Snippets/tce.sqlpromptsnippet b/Snippets/tce.sqlpromptsnippet deleted file mode 100644 index d9cb653c3..000000000 Binary files a/Snippets/tce.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/tco-e1d61823-f962-4817-b46b-1fa45d0f155e.json b/Snippets/tco-e1d61823-f962-4817-b46b-1fa45d0f155e.json new file mode 100644 index 000000000..32425ff6a --- /dev/null +++ b/Snippets/tco-e1d61823-f962-4817-b46b-1fa45d0f155e.json @@ -0,0 +1,6 @@ +{ + "id": "e1d61823-f962-4817-b46b-1fa45d0f155e", + "prefix": "tco", + "description": "tSQLt.CaptureOutput [tSQLt - Database Unit Testing for SQL Server. Get it at http://tsqlt.org]", + "body": "EXEC tSQLt.CaptureOutput '$CURSOR$';\n\nSELECT * \n INTO #Actual\n FROM tSQLt.CaptureOutputLog;\n\n" +} \ No newline at end of file diff --git a/Snippets/tco.sqlpromptsnippet b/Snippets/tco.sqlpromptsnippet deleted file mode 100644 index fc51a664e..000000000 Binary files a/Snippets/tco.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/tct-de08e455-b344-40d1-bec7-056d0d4f22ce.json b/Snippets/tct-de08e455-b344-40d1-bec7-056d0d4f22ce.json new file mode 100644 index 000000000..58759bee8 --- /dev/null +++ b/Snippets/tct-de08e455-b344-40d1-bec7-056d0d4f22ce.json @@ -0,0 +1,6 @@ +{ + "id": "de08e455-b344-40d1-bec7-056d0d4f22ce", + "prefix": "tct", + "description": "tSQLt: Create Test [tSQLt - Database Unit Testing for SQL Server. Get it at http://tsqlt.org]", + "body": "CREATE PROCEDURE $CURSOR$.[test ]\nAS\nBEGIN\n\nEND;\nGO\n" +} \ No newline at end of file diff --git a/Snippets/tct.sqlpromptsnippet b/Snippets/tct.sqlpromptsnippet deleted file mode 100644 index 26e788ccd..000000000 Binary files a/Snippets/tct.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/te-6aff4b67-6976-4d9c-bc3c-d9357da6a676.json b/Snippets/te-6aff4b67-6976-4d9c-bc3c-d9357da6a676.json new file mode 100644 index 000000000..4fea578c5 --- /dev/null +++ b/Snippets/te-6aff4b67-6976-4d9c-bc3c-d9357da6a676.json @@ -0,0 +1,6 @@ +{ + "id": "6aff4b67-6976-4d9c-bc3c-d9357da6a676", + "prefix": "te", + "description": "tSQLt.AssertEquals [tSQLt - Database Unit Testing for SQL Server. Get it at http://tsqlt.org]", + "body": "EXEC tSQLt.AssertEquals @Expected = '$CURSOR$', @Actual;" +} \ No newline at end of file diff --git a/Snippets/te.sqlpromptsnippet b/Snippets/te.sqlpromptsnippet deleted file mode 100644 index 5aab6f3fc..000000000 Binary files a/Snippets/te.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/tes-24e2fa41-6d2e-4ab4-abf5-e61515af074f.json b/Snippets/tes-24e2fa41-6d2e-4ab4-abf5-e61515af074f.json new file mode 100644 index 000000000..3ff626d28 --- /dev/null +++ b/Snippets/tes-24e2fa41-6d2e-4ab4-abf5-e61515af074f.json @@ -0,0 +1,6 @@ +{ + "id": "24e2fa41-6d2e-4ab4-abf5-e61515af074f", + "prefix": "tes", + "description": "tSQLt.AssertEqualsString [tSQLt - Database Unit Testing for SQL Server. Get it at http://tsqlt.org]", + "body": "EXEC tSQLt.AssertEqualsString @Expected = '$CURSOR$', @Actual;" +} \ No newline at end of file diff --git a/Snippets/tes.sqlpromptsnippet b/Snippets/tes.sqlpromptsnippet deleted file mode 100644 index b59260fac..000000000 Binary files a/Snippets/tes.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/tet-79fc09fc-5525-4e31-bc4c-04908b82b72d.json b/Snippets/tet-79fc09fc-5525-4e31-bc4c-04908b82b72d.json new file mode 100644 index 000000000..5f0421fa4 --- /dev/null +++ b/Snippets/tet-79fc09fc-5525-4e31-bc4c-04908b82b72d.json @@ -0,0 +1,6 @@ +{ + "id": "79fc09fc-5525-4e31-bc4c-04908b82b72d", + "prefix": "tet", + "description": "tSQLt.AssertEqualsTable [tSQLt - Database Unit Testing for SQL Server. Get it at http://tsqlt.org]", + "body": "EXEC tSQLt.AssertEqualsTable '#Expected','#Actual';\n" +} \ No newline at end of file diff --git a/Snippets/tet.sqlpromptsnippet b/Snippets/tet.sqlpromptsnippet deleted file mode 100644 index c37c36877..000000000 Binary files a/Snippets/tet.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/tf-96133107-7dc4-47b7-8507-59abed6c291a.json b/Snippets/tf-96133107-7dc4-47b7-8507-59abed6c291a.json new file mode 100644 index 000000000..62ba3ecb9 --- /dev/null +++ b/Snippets/tf-96133107-7dc4-47b7-8507-59abed6c291a.json @@ -0,0 +1,6 @@ +{ + "id": "96133107-7dc4-47b7-8507-59abed6c291a", + "prefix": "tf", + "description": "tSQLt.Fail [tSQLt - Database Unit Testing for SQL Server. Get it at http://tsqlt.org]", + "body": "EXEC tSQLt.Fail '$CURSOR$';" +} \ No newline at end of file diff --git a/Snippets/tf.sqlpromptsnippet b/Snippets/tf.sqlpromptsnippet deleted file mode 100644 index a75fb2534..000000000 Binary files a/Snippets/tf.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/tff-af43e66b-f6a1-4470-b88b-db219eeb4fbb.json b/Snippets/tff-af43e66b-f6a1-4470-b88b-db219eeb4fbb.json new file mode 100644 index 000000000..0befcf001 --- /dev/null +++ b/Snippets/tff-af43e66b-f6a1-4470-b88b-db219eeb4fbb.json @@ -0,0 +1,6 @@ +{ + "id": "af43e66b-f6a1-4470-b88b-db219eeb4fbb", + "prefix": "tff", + "description": "tSQLt.FakeFunction [tSQLt - Database Unit Testing for SQL Server. Get it at http://tsqlt.org]", + "body": "EXEC tSQLt.FakeFunction @FunctionName = '$CURSOR$', @FakeFunctionName = '';" +} \ No newline at end of file diff --git a/Snippets/tff.sqlpromptsnippet b/Snippets/tff.sqlpromptsnippet deleted file mode 100644 index a4c64228c..000000000 Binary files a/Snippets/tff.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/tft-0aed70b3-4fc7-49a2-a286-73e07dd91829.json b/Snippets/tft-0aed70b3-4fc7-49a2-a286-73e07dd91829.json new file mode 100644 index 000000000..d39b4621a --- /dev/null +++ b/Snippets/tft-0aed70b3-4fc7-49a2-a286-73e07dd91829.json @@ -0,0 +1,6 @@ +{ + "id": "0aed70b3-4fc7-49a2-a286-73e07dd91829", + "prefix": "tft", + "description": "tSQLt.FakeTable [tSQLt - Database Unit Testing for SQL Server. Get it at http://tsqlt.org]", + "body": "EXEC tSQLt.FakeTable @TableName = '$CURSOR$', @Identity = 0, @ComputedColumns = 0, @Defaults = 0;" +} \ No newline at end of file diff --git a/Snippets/tft.sqlpromptsnippet b/Snippets/tft.sqlpromptsnippet deleted file mode 100644 index 32f3117ad..000000000 Binary files a/Snippets/tft.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/tie-2cdd7cf3-a745-400c-9fc2-8038b7dfe13b.json b/Snippets/tie-2cdd7cf3-a745-400c-9fc2-8038b7dfe13b.json new file mode 100644 index 000000000..6981b80a9 --- /dev/null +++ b/Snippets/tie-2cdd7cf3-a745-400c-9fc2-8038b7dfe13b.json @@ -0,0 +1,6 @@ +{ + "id": "2cdd7cf3-a745-400c-9fc2-8038b7dfe13b", + "prefix": "tie", + "description": "tSQLt: INSERT INTO #Expected [tSQLt - Database Unit Testing for SQL Server. Get it at http://tsqlt.org]", + "body": "INSERT INTO #Expected\nVALUES($CURSOR$);" +} \ No newline at end of file diff --git a/Snippets/tie.sqlpromptsnippet b/Snippets/tie.sqlpromptsnippet deleted file mode 100644 index e559dba5c..000000000 Binary files a/Snippets/tie.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/tmt-4ee3d830-ca84-48bb-8675-f754b78c6d7f.json b/Snippets/tmt-4ee3d830-ca84-48bb-8675-f754b78c6d7f.json new file mode 100644 index 000000000..52a3b8442 --- /dev/null +++ b/Snippets/tmt-4ee3d830-ca84-48bb-8675-f754b78c6d7f.json @@ -0,0 +1,6 @@ +{ + "id": "4ee3d830-ca84-48bb-8675-f754b78c6d7f", + "prefix": "tmt", + "description": "tSQLt.AssertEmptyTable [tSQLt - Database Unit Testing for SQL Server. Get it at http://tsqlt.org]", + "body": "EXEC tSQLt.AssertEmptyTable @TableName = '$CURSOR$';" +} \ No newline at end of file diff --git a/Snippets/tmt.sqlpromptsnippet b/Snippets/tmt.sqlpromptsnippet deleted file mode 100644 index 7cada3afb..000000000 Binary files a/Snippets/tmt.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/tnc-f148752f-b077-45d6-8d34-b4cf121196d0.json b/Snippets/tnc-f148752f-b077-45d6-8d34-b4cf121196d0.json new file mode 100644 index 000000000..cffd0ae43 --- /dev/null +++ b/Snippets/tnc-f148752f-b077-45d6-8d34-b4cf121196d0.json @@ -0,0 +1,6 @@ +{ + "id": "f148752f-b077-45d6-8d34-b4cf121196d0", + "prefix": "tnc", + "description": "tSQLt.NewConnection [tSQLt - Database Unit Testing for SQL Server. Get it at http://tsqlt.org]", + "body": "EXEC tSQLt.NewConnection @command='$CURSOR$';" +} \ No newline at end of file diff --git a/Snippets/tnc.sqlpromptsnippet b/Snippets/tnc.sqlpromptsnippet deleted file mode 100644 index 4568b1691..000000000 Binary files a/Snippets/tnc.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/tne-2d99357a-cb56-43dd-a351-442f1aeb4c46.json b/Snippets/tne-2d99357a-cb56-43dd-a351-442f1aeb4c46.json new file mode 100644 index 000000000..b40f8a493 --- /dev/null +++ b/Snippets/tne-2d99357a-cb56-43dd-a351-442f1aeb4c46.json @@ -0,0 +1,6 @@ +{ + "id": "2d99357a-cb56-43dd-a351-442f1aeb4c46", + "prefix": "tne", + "description": "tSQLt.AssertNotEquals [tSQLt - Database Unit Testing for SQL Server. Get it at http://tsqlt.org]", + "body": "EXEC tSQLt.AssertNotEquals @Expected = '$CURSOR$', @Actual;" +} \ No newline at end of file diff --git a/Snippets/tne.sqlpromptsnippet b/Snippets/tne.sqlpromptsnippet deleted file mode 100644 index 110e2a74c..000000000 Binary files a/Snippets/tne.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/tnt-ead15f93-6194-4f96-98e6-e6354292140d.json b/Snippets/tnt-ead15f93-6194-4f96-98e6-e6354292140d.json new file mode 100644 index 000000000..31c90016c --- /dev/null +++ b/Snippets/tnt-ead15f93-6194-4f96-98e6-e6354292140d.json @@ -0,0 +1,6 @@ +{ + "id": "ead15f93-6194-4f96-98e6-e6354292140d", + "prefix": "tnt", + "description": "tSQLt.NewTestClass [tSQLt - Database Unit Testing for SQL Server. Get it at http://tsqlt.org]", + "body": "EXEC tSQLt.NewTestClass '$CURSOR$';\nGO\nCREATE PROCEDURE .[test ]\nAS\nBEGIN\n\nEND;\nGO\n" +} \ No newline at end of file diff --git a/Snippets/tnt.sqlpromptsnippet b/Snippets/tnt.sqlpromptsnippet deleted file mode 100644 index 7d2a7d50f..000000000 Binary files a/Snippets/tnt.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/toe-93a78b96-b01f-4681-8646-a2d8fcf3eb34.json b/Snippets/toe-93a78b96-b01f-4681-8646-a2d8fcf3eb34.json new file mode 100644 index 000000000..c8b07c60e --- /dev/null +++ b/Snippets/toe-93a78b96-b01f-4681-8646-a2d8fcf3eb34.json @@ -0,0 +1,6 @@ +{ + "id": "93a78b96-b01f-4681-8646-a2d8fcf3eb34", + "prefix": "toe", + "description": "tSQLt.AssertObjectExists [tSQLt - Database Unit Testing for SQL Server. Get it at http://tsqlt.org]", + "body": "EXEC tSQLt.AssertObjectExists @ObjectName = '$CURSOR$';" +} \ No newline at end of file diff --git a/Snippets/toe.sqlpromptsnippet b/Snippets/toe.sqlpromptsnippet deleted file mode 100644 index 0003a5fed..000000000 Binary files a/Snippets/toe.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/tpc-c2a18766-36e2-4628-b9a2-16887c69d164.json b/Snippets/tpc-c2a18766-36e2-4628-b9a2-16887c69d164.json new file mode 100644 index 000000000..b07d14cf2 --- /dev/null +++ b/Snippets/tpc-c2a18766-36e2-4628-b9a2-16887c69d164.json @@ -0,0 +1,6 @@ +{ + "id": "c2a18766-36e2-4628-b9a2-16887c69d164", + "prefix": "tpc", + "description": "tSQLt: Test Pattern - Current Event [tSQLt - Database Unit Testing for SQL Server. Get it at http://tsqlt.org]", + "body": "DECLARE @actual DATETIME2;\nDECLARE @after DATETIME2;\nDECLARE @before DATETIME2;\n\nSET @before = SYSUTCDATETIME(); \n\nEXEC $CURSOR$\n\nSET @after = SYSUTCDATETIME(); \n\nSELECT @actual = \nFROM \n\nIF(@actual < @before OR @actual > @after OR @actual IS NULL)\nBEGIN\n DECLARE @msg NVARCHAR(MAX) = \n 'Expected:'+\n CONVERT(NVARCHAR(MAX),@before,121)+\n ' <= '+\n ISNULL(CONVERT(NVARCHAR(MAX),@actual,121),'!NULL!')+\n ' <= '+\n CONVERT(NVARCHAR(MAX),@after,121);\n EXEC tSQLt.Fail @msg;\nEND;\n\n" +} \ No newline at end of file diff --git a/Snippets/tpc.sqlpromptsnippet b/Snippets/tpc.sqlpromptsnippet deleted file mode 100644 index b0ed7e0f1..000000000 Binary files a/Snippets/tpc.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/trf-e83dcd46-f555-4a3c-9139-2e2199fe2f33.json b/Snippets/trf-e83dcd46-f555-4a3c-9139-2e2199fe2f33.json new file mode 100644 index 000000000..a2e695b82 --- /dev/null +++ b/Snippets/trf-e83dcd46-f555-4a3c-9139-2e2199fe2f33.json @@ -0,0 +1,6 @@ +{ + "id": "e83dcd46-f555-4a3c-9139-2e2199fe2f33", + "prefix": "trf", + "description": "tSQLt.ResultSetFilter [tSQLt - Database Unit Testing for SQL Server. Get it at http://tsqlt.org]", + "body": "EXEC tSQLt.ResultSetFilter @ResultsetNo = 1, @Command = '$CURSOR$';" +} \ No newline at end of file diff --git a/Snippets/trf.sqlpromptsnippet b/Snippets/trf.sqlpromptsnippet deleted file mode 100644 index 278549e0e..000000000 Binary files a/Snippets/trf.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/tro-7f9ed1aa-cd8f-45ca-9897-d44ee1a7f6ef.json b/Snippets/tro-7f9ed1aa-cd8f-45ca-9897-d44ee1a7f6ef.json new file mode 100644 index 000000000..c3702c935 --- /dev/null +++ b/Snippets/tro-7f9ed1aa-cd8f-45ca-9897-d44ee1a7f6ef.json @@ -0,0 +1,6 @@ +{ + "id": "7f9ed1aa-cd8f-45ca-9897-d44ee1a7f6ef", + "prefix": "tro", + "description": "tSQLt.RemoveObject [tSQLt - Database Unit Testing for SQL Server. Get it at http://tsqlt.org]", + "body": "EXEC tSQLt.RemoveObject @ObjectName = '$CURSOR$';" +} \ No newline at end of file diff --git a/Snippets/tro.sqlpromptsnippet b/Snippets/tro.sqlpromptsnippet deleted file mode 100644 index 4e35bfde4..000000000 Binary files a/Snippets/tro.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/tso-92d0b23c-4689-4102-867f-9882e86145ac.json b/Snippets/tso-92d0b23c-4689-4102-867f-9882e86145ac.json new file mode 100644 index 000000000..6d8049660 --- /dev/null +++ b/Snippets/tso-92d0b23c-4689-4102-867f-9882e86145ac.json @@ -0,0 +1,6 @@ +{ + "id": "92d0b23c-4689-4102-867f-9882e86145ac", + "prefix": "tso", + "description": "tSQLt.SuppressOutput [tSQLt - Database Unit Testing for SQL Server. Get it at http://tsqlt.org]", + "body": "EXEC tSQLt.SuppressOutput @command = '$CURSOR$';" +} \ No newline at end of file diff --git a/Snippets/tso.sqlpromptsnippet b/Snippets/tso.sqlpromptsnippet deleted file mode 100644 index e477f367c..000000000 Binary files a/Snippets/tso.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/tsp-dd0270a1-aee1-49da-aef3-1e932fa22003.json b/Snippets/tsp-dd0270a1-aee1-49da-aef3-1e932fa22003.json new file mode 100644 index 000000000..ac57fed9c --- /dev/null +++ b/Snippets/tsp-dd0270a1-aee1-49da-aef3-1e932fa22003.json @@ -0,0 +1,6 @@ +{ + "id": "dd0270a1-aee1-49da-aef3-1e932fa22003", + "prefix": "tsp", + "description": "tSQLt.SpyProcedure [tSQLt - Database Unit Testing for SQL Server. Get it at http://tsqlt.org]", + "body": "EXEC tSQLt.SpyProcedure @ProcedureName = '$CURSOR$', @CommandToExecute = NULL;" +} \ No newline at end of file diff --git a/Snippets/tsp.sqlpromptsnippet b/Snippets/tsp.sqlpromptsnippet deleted file mode 100644 index a60e7cac5..000000000 Binary files a/Snippets/tsp.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/txe-e00c1ace-c5a1-4a51-acf3-b800df50bc8b.json b/Snippets/txe-e00c1ace-c5a1-4a51-acf3-b800df50bc8b.json new file mode 100644 index 000000000..6d3d273f0 --- /dev/null +++ b/Snippets/txe-e00c1ace-c5a1-4a51-acf3-b800df50bc8b.json @@ -0,0 +1,6 @@ +{ + "id": "e00c1ace-c5a1-4a51-acf3-b800df50bc8b", + "prefix": "txe", + "description": "tSQLt.ExpectException [tSQLt - Database Unit Testing for SQL Server. Get it at http://tsqlt.org]", + "body": "EXEC tSQLt.ExpectException @ExpectedMessage = '$CURSOR$', @ExpectedSeverity = NULL, @ExpectedState = NULL;" +} \ No newline at end of file diff --git a/Snippets/txe.sqlpromptsnippet b/Snippets/txe.sqlpromptsnippet deleted file mode 100644 index 5ce647c39..000000000 Binary files a/Snippets/txe.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/txn-0b75b58e-18b8-40d2-9c0e-6bc31def0a60.json b/Snippets/txn-0b75b58e-18b8-40d2-9c0e-6bc31def0a60.json new file mode 100644 index 000000000..d72fb42f9 --- /dev/null +++ b/Snippets/txn-0b75b58e-18b8-40d2-9c0e-6bc31def0a60.json @@ -0,0 +1,6 @@ +{ + "id": "0b75b58e-18b8-40d2-9c0e-6bc31def0a60", + "prefix": "txn", + "description": "tSQLt.ExpectNoException [tSQLt - Database Unit Testing for SQL Server. Get it at http://tsqlt.org]", + "body": "EXEC tSQLt.ExpectNoException;\n" +} \ No newline at end of file diff --git a/Snippets/txn.sqlpromptsnippet b/Snippets/txn.sqlpromptsnippet deleted file mode 100644 index f36a563f9..000000000 Binary files a/Snippets/txn.sqlpromptsnippet and /dev/null differ diff --git a/Snippets/txp-37aefeab-e603-4701-bd2c-d294564b25bb.json b/Snippets/txp-37aefeab-e603-4701-bd2c-d294564b25bb.json new file mode 100644 index 000000000..042fa4e94 --- /dev/null +++ b/Snippets/txp-37aefeab-e603-4701-bd2c-d294564b25bb.json @@ -0,0 +1,6 @@ +{ + "id": "37aefeab-e603-4701-bd2c-d294564b25bb", + "prefix": "txp", + "description": "tSQLt.ExpectException:Pattern [tSQLt - Database Unit Testing for SQL Server. Get it at http://tsqlt.org]", + "body": "EXEC tSQLt.ExpectException @ExpectedMessagePattern = '$CURSOR$', @ExpectedSeverity = NULL, @ExpectedState = NULL;" +} \ No newline at end of file diff --git a/Snippets/txp.sqlpromptsnippet b/Snippets/txp.sqlpromptsnippet deleted file mode 100644 index 8f44bfd1a..000000000 Binary files a/Snippets/txp.sqlpromptsnippet and /dev/null differ