Dear gsogol , Before Unit testing you have to check you code properly. Your code must be testable. You can see some examples on http://www.ayende.com/wiki/Rhino+Mocks+Introduction.ashx . I faced same problem like you. I had to refactor my code also.
Asif Dhaka, Bangladesh On 3/5/10, gsogol <[email protected]> wrote: > > Yeah, that's what I was thinking. I can't really refactor now because > it's a huge app and I'm trying to introduce unit testing to my team > and when I saw that method and created the unit test for it (without > any ctor injections), I really didn't know what I was testing. Your > last paragraph confirms my thoughts. > > I guess it's yet another proof that testing doesn't just help you > create executable tests, but makes you think in better programming > terms. Thank you. > > -- > 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]<rhinomocks%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/rhinomocks?hl=en. > > -- 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.
