I'm wondering what the best way to do this is... I'm interested in introducing PostSharp into one of my projects, but I'm not sure how to unit test classes marked with an attribute properly.
For example:
public class hello {
[MyAspectThatDoesSomethingToTheDatabaseWhenThisMethodGetsCalled]
public int omg(string lol) {
//fancy logic in here
}
}
I'd like to test the logic in the omg() method, but in the unit tests I need to make sure that the aspect doesn't get called, because there isn't really a database.
Thoughts?