I am creating an Active Directory wrapper in VBNET 2.0 (I cannot use .NET later), in which I have the following:
- Iutilisateur
- Igroupe
- IUniteOrganisation
These interfaces are implemented in inner classes (Friend in VBNET), so I want to implement a facade to initiate each of the interfaces with their inner classes. This will allow the architecture to increase flexibility, etc.
Now I want to test these classes (Utilisateur, Groupe, UniteOrganisation) in another project as part of the same solution. However, these classes are internal. I would like to be able to create them without going through my facade, but only for these tests, nothing more.
Here is a code snippet to illustrate it:
public static class DirectoryFacade { public static IGroupe CreerGroupe() { return new Groupe(); } }
I recently heard about the InternalsVisibleTo () attribute. I was wondering if it is available in VBNET 2.0 / VS2005 so that I can access the assmebly inner classes for my tests? Otherwise, how could I achieve this?
EDIT Is this a good testing practice like me?
source share