B
B
beavis2014-02-14 08:59:48
.NET
beavis, 2014-02-14 08:59:48

How to test internal classes?

How to test internal classes in VS2013 without making changes to the assembly under test?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
aush, 2014-02-17
@beavis88

PrivateObject
msdn.microsoft.com/en-us/library/microsoft.visuals...

B
bearded_guy, 2014-02-14
@bearded_guy

The best option is still to add to the tested assembly
[assembly: InternalsVisibleTo("MyTest")]

D
Dmitry Guketlev, 2014-02-14
@Yavanosta

using System.Runtime.CompilerServices;
[assembly:InternalsVisibleTo("MyTests")]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question