CNDDevelopingUnitTests
How to create unit test
Hyperlink test
- browse org.netbeans.modules.cnd.completion.cplusplus.hyperlink package for existing TestCases
- if none of them fits well for you create a new TestCase:
- create a new class in the package org.netbeans.modules.cnd.completion.cplusplus.hyperlink, name MUST ends with "TestCase"
- this class MUST extend HyperlinkBaseTestCase
- register this new TestCase in CsmHyperlinkTest class
- add a new test to the TestCase:
- create a new method in the TestCase class, name MUST begin with "test"
- this method can contain one or more performTest calls
- first 3 arguments of perfromTest are: file, line, pos where to perform hyperlink
- last 3 arguments of perfromTest are: file, line, pos where hyperlink should jump
- file for the TestCase should be placed into cnd.completion/test/unit/data/org/netbeans/modules/cnd/completion/cplusplus/hyperlink/ <Name of the TestCase> folder
- file for the TestCase should be enclosed into a namespace with the unique name (such as IZ number you were fixing)
|
|