Writing Better Assertions: Stop Using Assert.True for Expressions

added by DotNetKicks
2/2/2021 5:45:33 PM

668 Views

The Problem: Using Assert.True For Expressions One thing I keep running into in codebases lately (especially those where the team was new to writing automated tests), is assertions using expressions with Assert.True (or equivalent depending on your framework or language). The problem here is consider the following code: https://gist.github.com/scottsauber/77e82f42238652760d22a0e2054ddcde At quick glance, you can probably...


0 comments