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 caprutes 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})
//Or with numbered captures
Assert.AreEqual(${2}, ${1})
//How about NUnit's Assert.That
Assert.That(${Actual}, Is.EqualTo(${Actualy}))
Run that through the Replace tool in your editor and it's all cleaned up, no more crappy assertions!