Sorry for the lack of information.  This is on SQL 2005.

I have a visual studio generated dataset that I call the stored
procedure from...

        public int AddCWTRatingGroup(CWTRatingGroup ratingGroup)
        {
            int? errorNumber = null, id = null;
            string errorMessage = string.Empty;

            _CWTRatingGroupsTableAdapter.AddCWTRatingGroup
( ratingGroup.Name
                                                            
,ratingGroup.UserAdded
                                                            ,ref id
                                                            ,ref
errorNumber
                                                            ,ref
errorMessage);

            if( errorNumber != null )
                throw new Exception( string.Format( "Error {0}: {1}",
errorNumber, errorMessage ));

            return (int)id;


        }

Thanks,
Josh

On Mar 26, 9:03 am, "Philip Japikse" <[email protected]> wrote:
> What is the data store (SQL, Oracle, etc)?  Can you show your DAL code?
>
> 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 joshlrogers
> Sent: Thursday, March 26, 2009 9:50 AM
> To: MbUnit.User
> Subject: MbUnit Rollback not working
>
> It is very likely I may be missing something, but I am unable to get
> rollback to successfully work.  Here is my test:
>
>         [Test]
>         [Rollback]
>         public void DoesAddRulesGroupReturnValidValue()
>         {
>             CWTRatingGroup ratingGroup = new CWTRatingGroup();
>
>             ratingGroup.Name = "Test Insertion Group";
>             ratingGroup.UserAdded = 1;
>
>             object returnVal = _CWTRatingDAL.AddCWTRatingGroup
> (ratingGroup);
>
>             Assert.IsInstanceOfType(typeof(int), returnVal);
>             Assert.GreaterThanOrEqualTo<int>((int)returnVal,
> 0);
>
>         }
>
> I have tried the Roll back with and without the
> IncludeSetupAndTearDown and there is no change the transaction is not
> rolled back.  Now I am not using anything like NHibernate, I am just
> using my own data access layer.  I am new to TDD development and
> switched to MbUnit from NUnit due to the rollback feature, I am hoping
> I can get it working. Any help would be greatly appreciated!
>
> Thank you in advance,
> Josh Rogers
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to