c# - Restrict visibility of classes by specific assembly -
i working on application includes communication module uses tcp server , tcp client. communication module includes directory "core" contains private classes internal functioning of communication module.
my goal create unit tests classes in "core" directory. but, not accessible test project.
is there method, or design pattern allow me prevent use of these classes outside assembly, except test assembly?
thank you,
you can make internal classes available yourtestproject adding line:
[assembly: internalsvisibleto("yourtestproject")]
in assemblyinfo.cs of project want test.
Comments
Post a Comment