Is it possible to get Visual Studio (2010) or ReSharper to visualize method calls using different colors using custom attributes for these methods. For instance:
[Arrange]
private void ArrangeSomeVariablesAndSetup()
{
...
}
[Act]
private void ActOnThoseVariablesOrDoSomethingInteresting()
{
...
}
[Assert]
private void AssertThatSomethingHappeningThatWasExpecting()
{
...
}
Then, when calling these methods, Visual Studio should display them in color based on the attribute,
[Test]
public void MyTest()
{
ArrangeSomeVariablesAndSetup(); <-- Renders in green
ActOnThoseVariablesOrDoSomethingInteresting(); <-- Renders in blue
AssertThatSomethingHappeningThatWasExpecting(); <-- Renders in yellow
}
(Attribute names and colors are used solely as an example, and I do not necessarily limit this to unit testing)
Richk source
share