Easily replacing Assert.IsTrue statements

I blogged/ranted about Assert.IsTrue previously, well today I decided to work out a quick way to do bulk conversions of tests.
Well the easiest way to go about this is using a good old Regular Expression:
Assert\.IsTrue\((?<Actual>.*)\s*==\s*(?&l…

I blogged/ranted about Assert.IsTrue previously, well today I decided to work out a quick way to do bulk conversions of tests. Well the easiest way to go about this is using a good old Regular Expression: Assert\.IsTrue\((?<Actual>.*)\s*==\s*(?<Expected>.*)\) That’s a regex which is ideal for using from Visual Studio, or any other tool that supports named capture groups. If you don’t have something like that you can use numerical capture groups:
Print Share Comment Cite Upload Translate
CITATION GOES HERE CITATION GOES HERE
Select a language: