Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a way to conditionally exclude a test?
Message
 
 
To
08/03/2013 09:14:48
General information
Forum:
ASP.NET
Category:
Testing and debugging
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01567786
Message ID:
01567853
Views:
48
>That's how you have to do it.
>
>>The problem with this approach, though, that I had to make all my methods public in order to test them.

I am reading this article now

http://www.peterprovost.org/blog/2012/05/31/my-take-on-unit-testing-private-methods

and I am wondering what exactly this means:

Making a class or method public does not make it a part of your public API. You can mark is as “for internal use only” with various attributes or code constructs (depending on your language). You can put it into an “internals only” package or namespace. You can simply document it in your docs as being “internal use only”.

--------------------
Do you know what attributes I can use here? I'll make a research on this myself later, but may be you can answer right away.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform