Skip to content

Redundancy in the last example of the tutorial #164

Closed
@shepard8

Description

@shepard8

In the tutorial (https://tsqlt.org/user-guide/tsqlt-tutorial/)

The last example ends with:

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 😄

Regards,

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions