IMHO if you really code using TestDrivenDevelopment you write code just to get your test "green". In this case you don't have a line a code without test. If run code coverage you can check this.
I also believe that this is not so easy to do. Cheers, makka Maccari Claudio http://blogs.ugidotnet.org/makka -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Steve Dunn Sent: lunedì 29 ottobre 2007 17.21 To: MbUnit.User Subject: MbUnit Re: How to test non public metods Hi there, Generally, a Unit Test is testing 'behavior' rather than implementation. You are testing that Behavior X, given valid or invalid data, returns a certain value, and optionally, via Mocking, calls certain method a certain number of times. Up until recently, I tried to test every single bit of implementation and ended up with some tests in the same assembly and some tests externally (http://stevedunns.blogspot.com/2007/07/challenging- conventions-with-test-first.html). Dave Astels responded that behavior is what is seen from the outside. I've found since changing my approach, that any code not being covered by tests is not really being used by the exposed behavior and hence doesn't need to be there. Cheers, Steve http://dunnhq.com On Oct 25, 3:42 pm, ales_75 <[EMAIL PROTECTED]> wrote: > Hi all, > I'm new in TDD and Unit testing, I have a simple question. > We are developing huge application and now we are thinking about > automatic test of our code. > If we are start "Test first" development, how can I test all my code > if there are non public members of classes? > We do not want to release our application with test inside our > assemblies, so I think that we must have Test assemblies in which we > will have Test. > In release build of our application we do not ship Test assemblies. > But I cannot imagine how we can write our code with "Test First" > development, because all members of our classes are not public, so I > cannot test them all. > Can you point me to some materials where is how-to do that? > Or "Test First" development is only for public members of classes? > If I have to test only public classes, then most of tests will be > complicated and will not describe our code well. > > May be that this question is stupid, but if someone can help me with > it, It will be geat. > > Sorry for my poor english. > > Ales --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
