tmakin / rhinocommonunittesting Goto Github PK
View Code? Open in Web Editor NEWExample of unit testing RhinoCommon from within the Visual Studio test runner on windows
Example of unit testing RhinoCommon from within the Visual Studio test runner on windows
Discussing it here too.
When any version of the method is called, Curve.Offset() doesn't complete and throws "Object reference not set to an instance of an object."
Edit: To clarify, this might not be an issue because of this project, but it's directly related.
@tmakin I think I figured out why we need to manually load the Grasshopper.dll even though Rhino.Inside should load it by default.
I audited where the assemblies are loaded from and it seems that Rhino.Inside looks for them in the bin folder when it runs the tests. Without using a package.config file - with the new .csproj format - these are not copied in the build directory, so our tests fail to load them.
I added a new project using the old format rhino.inside loads everything fine.
https://github.com/marios-tsiliakos/RhinoCommonUnitTesting/blob/9f8569ec59a7d2101d5af3b7c6b4b19d20035ad8/Src/RhinoPlugin.Tests.RHInside/XunitTestFixtureRI.cs#L21-L39
Also when I tried to run the Xunit tests again and the GH one was failing because GH_IO.dll wasn't loaded so fixed that here:
https://github.com/marios-tsiliakos/RhinoCommonUnitTesting/blob/9f8569ec59a7d2101d5af3b7c6b4b19d20035ad8/Src/RhinoPlugin.Tests.Xunit/XunitTestFixture.cs#L65-L86
Let me know if you want to address any of these in a formal PR.
If I clone the project freshly and upgrade from the existing versions of GH/Rhino to the latest pre-release, The GHBox_Centroid_ReturnsGHPoint Test will return the following error:
System.IO.FileNotFoundException : Could not load file or assembly 'Grasshopper, Version=7.0.20168.13070, Culture=neutral, PublicKeyToken=dda4f5ec2cd80803' or one of its dependencies. The system cannot find the file specified.
Stack Trace:
XunitExampleTests.GHBox_Centroid_ReturnsGHPoint()
I've checked my local .nuget folder and this has the package in. I have no other issues with other projects using this package.
Hi guys,
Firstly thanks for this project templates, they helped already a lot!
When I want to initialize Point3d
objects in constructor to use them in different tests, somehow I can not run tests.. Do you know why?
Best regards,
Thanks for this template.
In the XUnitTestFixture, I see that you are using the locally installed Rhino. If I were to follow this template to run tests on a CI pipeline, I am assuming I will need to use Rhino Compute. Is that correct?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.