IF (@errorThrown = 0 OR (EXISTS (SELECT 1 FROM FinancialApp.Sales)))
BEGIN
EXEC tSQLt.Fail 'Sales table should not allow invalid currency';
END;
IF EXISTS (SELECT 1 FROM FinancialApp.Sales)
EXEC tSQLt.Fail 'Sales table should not allow invalid currency';
The two last lines are unnecessary since this is tested already just above. This is a small issue but the tutorial should show how easy it is to use the tool, which is why I believe these useless lines are bad :smile:
In the tutorial (https://tsqlt.org/user-guide/tsqlt-tutorial/)
The last example ends with:
The two last lines are unnecessary since this is tested already just above. This is a small issue but the tutorial should show how easy it is to use the tool, which is why I believe these useless lines are bad :smile:
Regards,