Created
November 4, 2022 17:24
-
-
Save JonathonRichardson/1bc38d239f445c725e2ffd79b3b3b885 to your computer and use it in GitHub Desktop.
Exposing internals of a CS project to a test project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Runtime.CompilerServices; | |
[assembly: InternalsVisibleTo("MCV.Lobos.Services.Database.Tests")] | |
/** | |
* Allow dynamically generated proxy types to access internals. For details see | |
* https://stackoverflow.com/questions/17569746/mocking-internal-classes-with-moq-for-unit-testing/17574183#17574183 | |
*/ | |
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] | |
namespace MCV.Lobos.Services.Database | |
{ | |
/* | |
* This class only exists to expose the internals of this project to the test | |
* runner. | |
*/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment