Unit test using CSUnit (1)
First, install CSUnit
Second, create a new project and create a class to be tested: ///
Third, create a test class
Add CSUNIT's reference, and create a category for testing, visibility is public, and must meet one of the following two conditions: 1, must end with Test; 2, plus properties: [TestFixTure]; add test Method, method visibility is public, and must satisfy one of the following two conditions: 1, must begin with Test; 2, plus attributes: [TEST] and then add test code in the method, the last code is as follows:
Public class forcsUnittest ()} public void testmyfunc () {forcSUnit csunit = new forcsunit (); assrt.true (true == csunit.myfunc (true);}}
Fourth, generate the executable of the project
5. Add the generated executable in CSUNITRUNNER
Sixth, final, run!
Is there any need to give me email: na57@ynu.edu.cn