So I really hate when people use Assert.IsTrue(a == b)
as an assertion in a unit test (I blogged my rant) so I decided to find a way to easily convert large test files to be more normal.
You'll want to search with this:
Assert\.IsTrue\((?<Actual>.*)\s*==\s*(?<Expected>.*)\)
//or if your language doesn't support named captures use:
Assert\.IsTrue\((.*)\s*==\s*(.*)\)
Maybe tweak the casing for your language (I've done this for .NET)
And do a replacement using:
Assert.AreEqual(${Expected}, ${Actual}, "WAS: Assert.IsTrue( ${Actual} == ${Expected} )")
//Or with numbered captures
Assert.AreEqual(${2}, ${1}, "WAS: Assert.IsTrue( ${1} == ${2} )")
//How about NUnit's Assert.That
Assert.That(${Actual}, Is.EqualTo(${Expected}))
Run that through the Replace tool in your editor and it's all cleaned up, no more crappy assertions!