Any homologue of InternalsVisibleToAttribute, but for internal classes?
- by Will Marcouiller
In my most recent question: Unit Testing Best Practice? / C# InternalsVisibleTo() attribute for VBNET 2.0 while testing?, I was asking about InternalsVisibleToAttribute.
I have read the documentation on how to use it, and everything is fine and understood. However, I can't instantiate my class Groupe from my Testing project.
I want to be able to instantiate my internal class in my wrapper assembly, from my testing assembly.
Any help is appreciated!
EDIT
Here's the compile-time error I get when I do try to instantiate my type:
Erreur 2 'Carra.Exemples.Blocs.ActiveDirectory.Groupe' n'est pas accessible dans ce contexte, car il est 'Private'. C:\Open\Projects\Exemples\Src\Carra.Exemples.Blocs.ActiveDirectory\Carra.Exemples.Blocs.ActiveDirectory.Tests\GroupeTests.vb 9 18 Carra.Exemples.Blocs.ActiveDirectory.Tests
(This says that my type is not accessible in this context, because it is private.) But it's Friend (internal)!