In the. NET environment for unit testing, there are a lot of software to complete, nunit is one of them. This is a unit test software that is named in the same name as JUnit and belongs to the xunit family. This software is available for free in http://www.NUnit.org. Nunit ApplicationProgramProvides a framework for compiling unit tests and a graphical interface for running these tests and viewing results.
This is a problem that occurs when nunit is used for the first time.
After nunit is installed, its documents will be installed together with the local hard disk. Try to follow the instructions in this document.CodeAdd reference using nunit. framework; if you try to compile a program, a compilation error will occur. For example, E:/myproject/testnunit2/form1.cs (104 ): the type or namespace name "nunit" is not found (is the using instruction or assembly reference missing ?) The reason is that after nunit is installed, nunit-related references are not automatically added to the. NET environment and must be manually added. In Solution Explorer, right-click a reference and choose add reference from the shortcut menu. In the. NET Component, select nunit. Framework and click OK. Then re-compile the program to avoid errors.
The documentation and examples included in nunit are good. If you do not want to read English, someone on the Internet has translated it into Chinese and you can find it in the search engine "nunit Quick Start.