A Unit Test project for grasshopper
- Build GH_UnitTest. The
.ghafile should automatically be copied into the right grasshopper component folder - Follow the example test
TestGrasshopper.csinUnitTest. This uses the gh definitionsum.ghas a simple use case
- Open Rhino once at the beginning of the Unit test and close it at the end using
[TestInitialize]
public void TestGrasshopper()
{
...
}
and
[TestCleanup]
public void testClean()
{
...
}
- Use TCP/IP connection to communicate with the unit test server rather than serializing to file