开发者

Unit Test Organization

开发者 https://www.devze.com 2022-12-24 05:16 出处:网络
I\'m using Nunit for unit testing, and added another project called \"Unit Testing\" to my current solution.I referenced Nunit, and changed the Namespace to the same namespace used in开发者_如何转开发

I'm using Nunit for unit testing, and added another project called "Unit Testing" to my current solution. I referenced Nunit, and changed the Namespace to the same namespace used in开发者_如何转开发 the main project.

I can't seem to figure out how to get access to all the classes, files, etc in the main project. Is there something I have to do to link two projects?


Did you add a project reference to your main project? Right click on your Unit Test project --> add reference --> project --> select your Main Project and add it


In your "Unit Testing" project, you just need to add a reference to the main project you want to test, just like you added the reference to NUnit.


You need to add a reference to the project like you would if you were linking any project that were held in the same Solution file.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号