Hello,
I am trying to follow the steps here to create geometric unit tests. I have a few problems:
- If the test fixture class inherits GeometricTestBase, NUnit does not recognise the test and therefore cannot run it.
- If it does not, NUnit recognises it but the code throws exceptions. Firstly it does not detect LibG.Interface, but after it is added to the reference, it shows the following.
System.NotImplementedException : The type initializer for ‘Autodesk.DesignScript.Geometry.ProtoGeometryConfigurationManager’ threw an exception.
My code is very simple.
using Autodesk.DesignScript.Geometry;
using NUnit.Framework;
using TestServices;
namespace TestCSharp
{
[TestFixture]
public class Program : GeometricTestBase
{
[Test]
public void TestPoint()
{
Point p = Point.ByCoordinates(1, 1, 1);
}
}
}
I use Visual Studio 2017 on Windows 10, and the project uses the following packages.
- CommonServiceLocator.1.3
- DynamoVisualProgramming.Core.1.3.0
- DynamoVisualProgramming.DynamoServices.1.3.0
- DynamoVisualProgramming.Tests.1.3.0
- DynamoVisualProgramming.ZeroTouchLibrary.1.3.0
- NUnit.3.8.1
- Prism.5.0.0
- Prism.Composition.5.0.0
- Prism.Interactivity.5.0.0
- Prism.Mvvm.1.1.1
- Prism.PubSubEvents.1.1.2
I understand that in Dynamo source code the geometric tests also inherit the GeometricTestBase class but so far I haven’t successfully built it.
I would be glad to receive any help to solve this problem, or see old posts related to this issue (unfortunately I haven’t found any).
Many thanks,
John