Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is there a way to conditionally exclude a test?
Message
 
 
À
08/03/2013 09:14:48
Information générale
Forum:
ASP.NET
Catégorie:
Test et débogage
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01567786
Message ID:
01567853
Vues:
49
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform