{"id":23694556,"url":"https://github.com/mcneel/simplerhinotests","last_synced_at":"2025-09-02T22:31:02.428Z","repository":{"id":225027406,"uuid":"666065780","full_name":"mcneel/SimpleRhinoTests","owner":"mcneel","description":"Example Rhino Unit Tests Project","archived":false,"fork":false,"pushed_at":"2024-11-25T22:25:31.000Z","size":312,"stargazers_count":16,"open_issues_count":2,"forks_count":4,"subscribers_count":29,"default_branch":"main","last_synced_at":"2024-11-25T23:26:43.742Z","etag":null,"topics":["grasshopper","grasshopper3d","nunit","rhino","rhino3d","unittest"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mcneel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-13T16:19:10.000Z","updated_at":"2024-11-25T22:25:35.000Z","dependencies_parsed_at":"2024-03-01T02:39:47.503Z","dependency_job_id":"8c89f49b-a427-47ff-81ff-f845b8f77789","html_url":"https://github.com/mcneel/SimpleRhinoTests","commit_stats":null,"previous_names":["mcneel/simplerhinotests"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcneel%2FSimpleRhinoTests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcneel%2FSimpleRhinoTests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcneel%2FSimpleRhinoTests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcneel%2FSimpleRhinoTests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcneel","download_url":"https://codeload.github.com/mcneel/SimpleRhinoTests/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231813530,"owners_count":18430470,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["grasshopper","grasshopper3d","nunit","rhino","rhino3d","unittest"],"created_at":"2024-12-30T04:27:15.584Z","updated_at":"2024-12-30T04:27:16.196Z","avatar_url":"https://github.com/mcneel.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SimpleRhinoTests\n\nExample project to setup unit tests in Rhino \u003e=8 using [Rhino.Testing](https://www.nuget.org/packages/Rhino.Testing) library.\n\n## Settin Up Your Project\n\nSee  [Rhino.Testing README](https://github.com/mcneel/Rhino.Testing/blob/main/README.md) on how to setup your project.\n\n### Referencing RhinoCommon\n\nIf you need to use RhinoCommon (other other Rhino assemblies) in your project, reference them based on the target framework, and **make sure they are NOT copied to the build directory** as they are shipped with Rhino:\n\n```xml\n  \u003cPropertyGroup\u003e\n    \u003cRhinoSystemDirectory\u003eC:\\Program Files\\Rhino 8\\System\u003c/RhinoSystemDirectory\u003e\n  \u003c/PropertyGroup\u003e\n\n  \u003cItemGroup Condition=\" $(TargetFramework.Contains('net7.0')) == 'true'\"\u003e\n    \u003cReference Include=\"$(RhinoSystemDirectory)\\netcore\\RhinoCommon.dll\" Private=\"False\" /\u003e\n  \u003c/ItemGroup\u003e\n\n  \u003cItemGroup Condition=\" $(TargetFramework.Contains('net48')) == 'true'\"\u003e\n    \u003cReference Include=\"$(RhinoSystemDirectory)\\RhinoCommon.dll\" Private=\"False\" /\u003e\n  \u003c/ItemGroup\u003e\n```\n\n## Local Testing\n\n### From Visual Studio\n\n- Open `SimpleNUnitTests.sln` in Visual Studio\n- Open **Test Explorer** panel (From Tools -\u003e Test Explorer menu)\n- Build project\n- **Test Explorer** panel will populate with tests for all frameworks the project is being built for.\n- Right-Click on any branch of the test tree to **Run** or **Debug** tests in that branch.\n\n![](./docs/vs-testing.png)\n\n- You can access the test configurations from the main toolbar as shown below:\n\n![](./docs/test-configs.png)\n\n- If native debugging is needed, activate option shown below:\n\n![](./docs/native-test-debug.png)\n\n### From VSCode\n\n- Open this directory in vscode\n- Make sure [C# Dev Kit](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit) extension is installed\n- Make sure **Testing** panel is active on the left activity bar\n- Testing panel will populate with tests for all frameworks the project is being built for.\n- Click **Run** or **Debug**button on any branch of the test tree or Right-Click to run or debug tests in that branch\n\n![](./docs/vscode-testing.png)\n\n![](./docs/vscode-testing-rclick.png)\n\n- You can also click on the test button in the editor gutter to run individual tests from the source. This will run the selected test, in all the target frameworks:\n\n![](./docs/vscode-testing-gutter.png)\n\n\n### From Rhino (Work in Progress)\n\n- Ensure RhinoNUnit plugin is loaded\n- Run `NUnit` command\n- Provide the path of compiled assembly that contains the tests. In this example it would be:\n  - `SimpleNUnitTests/bin/Debug/net48/SimpleNUnitTests.dll` for Rhino running in dotnet framework (`net48`)\n  - `SimpleNUnitTests/bin/Debug/net7.0-windows/SimpleNUnitTests.dll` for Rhino running in dotnet framework (`net7.0-windows`)\n- A window like below will pop up. Click **Start** to run the tests:\n\n![](./docs/nunit-in-rhino.png)\n\n### From shell\n\n- Open Powershell\n- Change directory to this project (`cd /path/to/SimpleNUnitTests/`)\n- Run the command below to run tests for both `net48` and `net7.0-windows`. Use `-c` flag to specify a configuration:\n\n```shell\ndotnet test ./SimpleNUnitTests.sln -c Release\n```\n\n- Use `-f` flag to specify a framework (`net48` and `net7.0-windows`):\n\n```shell\ndotnet test ./SimpleNUnitTests.sln -f net48\n```\n## Automated Testing\n\n### Using Github Actions (Work in Progress)\n\nAn example github workflow is setup under `.github/workflows/main.yml` that triggers running tests on every push to this repository.\n\n## Contribute:\n\n[Rhino.Testing](https://www.nuget.org/packages/Rhino.Testing) source repository is here: https://github.com/mcneel/Rhino.Testing\n\nFeel free to fork, improve, and submit pull requests.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcneel%2Fsimplerhinotests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcneel%2Fsimplerhinotests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcneel%2Fsimplerhinotests/lists"}