Hi,
I’m using SharpArch with SharpArch.Contrib’s [Transaction] attribute. The Transaction attribute is added to an application service method and if an exception is thrown during that method then any changes to any domain objects are rolledback. From all appearances this works well.
However, I’m writing NUnit tests to confirm that exceptions are being thrown when appropriate (invalid state, security errors, etc) but I also want to confirm that the Transaction attribute is present and doing its job to rollback the changes. Is there any way I can do this?
I do trust that SharpArch.Contrib’s Transaction attribute is solid code, but some future programmer could accidentally remove the Transaction attribute from a method or disable it during testing which would not be caught by the unit tests. Am I being overly cautious?
Thanks
Dan