I added enlist to the connectionstring and set log4net appender to UseTransactions and it still doesn't rollback. Maybe I'm not understanding you.
On Dec 4, 11:32 am, [EMAIL PROTECTED] wrote: > sorry I meant "enlist" > > Since you are on mbunit v2 try using RollBack2 from the MbUnit.Framework20 > assembly. > > The most current release is v3.0.5. > > > > -----Original Message----- > From: suedeuno <[EMAIL PROTECTED]> > Date: Thursday, Dec 4, 2008 9:24 am > Subject: MbUnit Re: Rollback usage and expectation > To: "MbUnit.User" <[email protected]>Reply-To: > [email protected] > > I am using MBUnit v. 2.4.2.355 which I believe is the most current > release. > > Ok, can you explain or give an example of what you mean by 'Log4Net > would need to subscribe to the transaction'? > > On Dec 4, 10:36 am, "Philip Japikse" <[EMAIL PROTECTED]> wrote: > > I'm not sure that's the correct use case for the RollBack attribute (I > > presume you are using MbUnit 2.x by the syntax). Log4Net would need to > > subscribe to the transaction (which I believe is managed by MSDTC, but Jeff > > can confirm/deny that). > > > I've never had a problem with the rollback working in 2.x or 3.x, but I am > > using to wrap tests that calls code that utilizes ADO.Net in one manner or > > another (EntLib,NHibernate,etc). > > > For example, > > > [Test] > > [RollBack] > > public void Should_Delete_A_User() > > { > > Assert.IsTrue(MyUserRepo.Delete(12)); > > > } > > > Calls my repository, deletes a user, return true if successful, which passes > > the assert, and then it all gets rolled back. > > > The only side effect I have seen is if you have identity columns as PKs, > > then it "uses" up numbers (not that it truly matters, since the number > > doesn't have any meaning anyway) > > > Phil > > Philip Japikse, MCSD.Net, MCDBA, CSM > > Principal Consultant > > Pinnacle Solutions, Inc > > [EMAIL PROTECTED] > > twitter/skimedic > > (513) 312-5664 > > > -----Original Message----- > > From: [email protected] [mailto:[EMAIL PROTECTED] On > > > Behalf Of suedeuno > > Sent: Thursday, December 04, 2008 11:30 AM > > To: MbUnit.User > > Subject: MbUnit Rollback usage and expectation > > > I have a simple test that uses log4net to log a message to sql > > server. > > > [Test] > > [RollBack] > > public void LoggerIsSuccessful() > > { > > log.Error("Test error"); > > } > > > Maybe I'm not using this properly but the rollback never occurs. Am I > > missing some requirement?- Hide quoted text - > > > - Show quoted text - > --~--~---------~--~----~------------~-------~--~----~ > You received this message because you are subscribed to the Google Groups > "MbUnit.User" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to [EMAIL PROTECTED] > For more options, visit this group > athttp://groups.google.com/group/MbUnitUser?hl- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MbUnit.User" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/MbUnitUser?hl=en -~----------~----~----~----~------~----~------~--~---
