Unit Testing for Synergy .NET
Synergy .NET supports unit testing for .NET Framework development, and SDI includes a unit test template: Unit Test Project. Synergy unit tests integrate with Visual Studio’s Test Explorer, and SDI uses the Visual Studio Unit Testing framework (MSTest).
|
1.
|
Open the solution that you want to unit test. |
|
2.
|
Create unit test projects using the “Synergy Unit Test Project (.NET Framework)” template. Generally, you’ll create a unit test project for each project in the solution (i.e., each assembly). |
|
3.
|
In each unit test project, add a reference to the project(s) it will test. |
|
4.
|
Code the tests using MSTest attributes. See Microsoft documentation (e.g., see Use the MSTest framework in unit tests), and note that for Synergy, attributes are enclosed in curly brackets (rather than square brackets)—for example: {TestMethod}. |