Hello all,
Here is an example of a piece of code and I want to check this
method's functionality . Please look on this method carefully. This
class contains a static method SaveBonus .I want to test this method
with RhinoMock. Here CRUDBuilder is another class of my application.
Database class is from dll of Microsoft.Practices. ....
Please show me the Test Method for this case
public class BonusDC
    {

public static void SaveBonus(Bonus objBonus)
        {
            int vResult = 0;
            Database vDB = DatabaseFactory.CreateDatabase();
            try
            {
                if (objBonus.IsNew)
                    vResult = vDB.ExecuteNonQuery(CommandType.Text,
CRUDBuilder.CREATEQuery(objBonus));
                else
                    vResult = vDB.ExecuteNonQuery(CommandType.Text,
CRUDBuilder.UPDATEQuery(objBonus));
            }
            catch (DbException ex)
            {
                bool rethrow = ExceptionPolicy.HandleException(ex,
"Data Context Exception Policy");
                if (rethrow)
                    throw;

            }
        }

}

-- 
You received this message because you are subscribed to the Google Groups 
"Rhino.Mocks" 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/rhinomocks?hl=en.

Reply via email to