Skip to content
Advertisement

Tag: tsqlt

tsqlt FakeTable not rolling back after unit test executed

I have an extremely simple unit test where I am testing the functionality of a tsqlt.FakeTable. However, after running the command and inserting data, it does not roll back to the previous state. Current table: [product01].[batch] After executing the below code, the table is not rolled back to the above. It overrides the data and I can see the temp

Must declare scalar variable in a unit test

I am trying to design a unit test that ensures that a message is bigger than a certain number of characters. My code is: I am getting the following errors: Msg 137, Level 15, State 2, Procedure test that API_GetStandardDisclaimerText tests to make sure that the message is long enough, Line 25 [Batch Start Line 3] Must declare the scalar

tSQLt apply NOT NULL constraint

How do I apply the NOT NULL constraint back onto a column of a table in tSQLt? CREATE OR ALTER PROCEDURE [test abc].[test abc1] AS BEGIN — Arrange EXEC tSQLt.FakeTable ‘dbo’, ‘table1’; –…

tSQLt fails when attempting to FakeTable a synonym table

I am using tSQLt (through Red Gate’s SQL Test version 1.0.0.455). tSQLt is installed on database A. I am trying to do a tSQLt.FakeTable on a table in database B on the same SQL server instance through a synonym on database A. Code: ALTER PROCEDURE [ErrorType109NonTankHasSizeOrVolume].[test AliasTest] AS BEGIN Exec tSQLt.FakeTable ‘dbo.Bygning’; Insert Into dbo.Bygning (ObjStatus) Values (1); EXEC tSQLt.AssertEquals

Advertisement