The MbUnit documentation is currently down so I’m stuck here to ponder an oddity of MbUnit. When you want to use the RollBack() attribute you need to reference the MbUnit.Framework.1.1.Dll. This seems a bit weird to me. I’m sure there has to be a better way of doing this but until I find out I’ll be stuck using this reference I guess.
If you came here trying to find information on MbUnit RollBack it’s pretty simple as far as I understand it. Throw a RollBack() attribute into your test and it will rollback any database changes.
You may run into an MS DTC error if you are working against a database that is remote. In this case you’ll need to turn on MS DTC. You can Google how to do this fairly easily so I’m not going to link to any specific article since I can’t vouch for the “best” options to enable. Below is a simple example:
public void RemoveSeatFrom_ShouldCallDatabaseAndRemoveSeatFromSpecifiedOrder()