Unit tests using RhinoCommon on linux

I am developing a rhino plugin, currently I am working on some JSON deserialisation code which I’d like to write unit tests for. Currently the code only uses the Geometry part of the RhinoCommon package. However I develop on linux, so I can’t run any unit tests without spinning up a windows VM. Is it possible to get the RhinoCommon assembly for linux? I have installed rhino on the windows VM, so I’m happy to copy the assembly from there if that’s possible. I have very little C# experience so any pointers would be greatly appreciated.

Update: unit tests don’t work on Windows either, since the RhinoCommon assembly can’t be found. Is there some way to fix this?

Unfortunately not.

Yep! There’s a nuget you can use.

You can also use xunit to run Rhino in headless mode for unit testing, however still it is only for Windows.

Are there any examples of using Rhino.Testing? (on windows I mean) I am struggling to get it working.

Sample

There is also a testing template which I did recently that should help you get started

2 Likes