简体   繁体   中英

Mock reference in Visual Studio 2012

hi i am doing unit testing of entity framework with repository pattern. I just try to mock a repository class in my test project

private Mock<IStudentRepository> repositoryMock;  

and i am using the namespace

 Using Moq;    // is that correct????????

but the assembly reference/directive is missing error shows, so i try to add references, but i cant understand which is assembly reference/directive of Moq. Can anybody please help me

Try to define the "using" in lowercase.

Make sure that you have referenced the Moq library in your project. You could use NuGet to get it:

Install-Package Moq

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM