diff --git a/test/Libraries/SystemTestServices/SystemTestBase.cs b/test/Libraries/SystemTestServices/SystemTestBase.cs index 774a09abb68..24390bbf9e9 100644 --- a/test/Libraries/SystemTestServices/SystemTestBase.cs +++ b/test/Libraries/SystemTestServices/SystemTestBase.cs @@ -194,7 +194,8 @@ protected virtual void StartDynamo(TestSessionConfiguration testConfig) StartInTestMode = true, PathResolver = pathResolver, GeometryFactoryPath = preloader.GeometryFactoryPath, - ProcessMode = TaskProcessMode.Synchronous + ProcessMode = TaskProcessMode.Synchronous, + DynamoCorePath = testConfig.DynamoCorePath }); ViewModel = DynamoViewModel.Start( @@ -305,15 +306,29 @@ public void AssertPreviewCount(string guid, int count) Assert.AreEqual(count, data.GetElements().ToList().Count); } - public NodeModel GetNode(string guid) where T : NodeModel + /// + /// Returns the NodeModel corresponding to the input guid + /// + /// A NodeModel (or derived) type + /// The node Guid + /// + /// + [Obsolete("This method will be removed in a future version of Dynamo")] + public NodeModel GetNode(string guid) where T : class { + bool isNodeModel = typeof(T) == typeof(NodeModel); + bool isDerivedFromNodeModel = typeof(T).IsSubclassOf(typeof(NodeModel)); + if ( !isNodeModel && !isDerivedFromNodeModel) + { + throw new Exception($"{typeof(T)} is not of type NodeModel"); + } var allNodes = ViewModel.Model.CurrentWorkspace.Nodes; var nodes = allNodes.Where(x => string.CompareOrdinal(x.GUID.ToString(), guid) == 0); if (nodes.Count() < 1) return null; else if (nodes.Count() > 1) throw new Exception("There are more than one nodes with the same GUID!"); - return nodes.ElementAt(0) as T; + return nodes.ElementAt(0); } public object GetPreviewValue(string guid) diff --git a/tools/NuGet/build_props/DynamoVisualProgramming.Tests.props b/tools/NuGet/build_props/DynamoVisualProgramming.Tests.props new file mode 100644 index 00000000000..b9be3bf82b4 --- /dev/null +++ b/tools/NuGet/build_props/DynamoVisualProgramming.Tests.props @@ -0,0 +1,9 @@ + + + + TestServices.dll.config + Always + True + + + diff --git a/tools/NuGet/build_props/TestServices.dll.config b/tools/NuGet/build_props/TestServices.dll.config new file mode 100644 index 00000000000..0d8d234ba38 --- /dev/null +++ b/tools/NuGet/build_props/TestServices.dll.config @@ -0,0 +1,7 @@ + + + + + + + diff --git a/tools/NuGet/template-nuget/DynamoVisualProgramming.Core.nuspec b/tools/NuGet/template-nuget/DynamoVisualProgramming.Core.nuspec index bd2127d8cd4..d4e0c3df2d1 100644 --- a/tools/NuGet/template-nuget/DynamoVisualProgramming.Core.nuspec +++ b/tools/NuGet/template-nuget/DynamoVisualProgramming.Core.nuspec @@ -10,27 +10,15 @@ content\images\logo.png false - Assemblies required to start a DynamoModel and execute DesignScript code. Contains the following files: - 1) DynamoApplications.dll - 2) DynamoCore.dll - 3) DynamoInstallDetective.dll - 4) DynamoShapeManager.dll - 5) DynamoUtilities.dll - 6) ProtoCore.dll - 7) DesignScriptBuiltin.dll - 8) VMDataBridge.dll - 9) DSCPython.dll - 10) DynamoPackages.dll + Assemblies required to reference core APIs from Dynamo. This package contains the core assemblies for Dynamo. Copyright Autodesk 2023 - - + - @@ -57,4 +45,4 @@ - + \ No newline at end of file diff --git a/tools/NuGet/template-nuget/DynamoVisualProgramming.DynamoCoreNodes.nuspec b/tools/NuGet/template-nuget/DynamoVisualProgramming.DynamoCoreNodes.nuspec index 26bcb36c694..1041a024aa8 100644 --- a/tools/NuGet/template-nuget/DynamoVisualProgramming.DynamoCoreNodes.nuspec +++ b/tools/NuGet/template-nuget/DynamoVisualProgramming.DynamoCoreNodes.nuspec @@ -10,13 +10,7 @@ content\images\logo.png false - Reference the core node types for Dynamo. It contains the following files: - 1) Analysis.dll - 2) GeometryColor.dll - 3) DSCoreNodes.dll - 4) CoreNodeModels.dll - 5) Watch3DNodeModels.dll - 6) UnitNodeModels.dll + Reference the core node types for Dynamo. Copyright Autodesk 2023 diff --git a/tools/NuGet/template-nuget/DynamoVisualProgramming.Tests.nuspec b/tools/NuGet/template-nuget/DynamoVisualProgramming.Tests.nuspec index 2e1ccddb92c..5b47ba3dfaf 100644 --- a/tools/NuGet/template-nuget/DynamoVisualProgramming.Tests.nuspec +++ b/tools/NuGet/template-nuget/DynamoVisualProgramming.Tests.nuspec @@ -9,23 +9,30 @@ https://github.com/DynamoDS/Dynamo content\images\logo.png false - Unit and system test infrastructure for Dynamo. It contains the following files: - 1) DynamoCoreTests.dll - 2) SystemTestServices.dll - 3) TestServices.dll + Unit and system test infrastructure for Dynamo. This package contains all that is required to get up and running creating tests for Dynamo libraries. Copyright Autodesk 2023 - + + + + + + + + + + + diff --git a/tools/NuGet/template-nuget/DynamoVisualProgramming.WpfUILibrary.nuspec b/tools/NuGet/template-nuget/DynamoVisualProgramming.WpfUILibrary.nuspec index 84a8254e081..f93449ba0fc 100644 --- a/tools/NuGet/template-nuget/DynamoVisualProgramming.WpfUILibrary.nuspec +++ b/tools/NuGet/template-nuget/DynamoVisualProgramming.WpfUILibrary.nuspec @@ -10,18 +10,10 @@ content\images\logo.png false - Build node libraries for Dynamo with custom UI in WPF. It contains the following files: - 1) DynamoCoreWpf.dll - 2) CoreNodeModelsWpf.dll + Build node libraries for Dynamo with custom UI in WPF. This package contains all that is required to get up and running building nodes for the Dynamo Visual Programming language with custom UI in WPF. Copyright Autodesk 2023 - - - - - - diff --git a/tools/NuGet/template-nuget/DynamoVisualProgramming.ZeroTouchLibrary.nuspec b/tools/NuGet/template-nuget/DynamoVisualProgramming.ZeroTouchLibrary.nuspec index b756cebe764..6d58e8088cf 100644 --- a/tools/NuGet/template-nuget/DynamoVisualProgramming.ZeroTouchLibrary.nuspec +++ b/tools/NuGet/template-nuget/DynamoVisualProgramming.ZeroTouchLibrary.nuspec @@ -9,9 +9,7 @@ https://github.com/DynamoDS/Dynamo content\images\logo.png false - Build zero touch node libraries for Dynamo. It contains the following files: - 1) DynamoUnits.dll - 2) ProtoGeometry.dll + Build zero touch node libraries for Dynamo. This package contains all that is required to get up and running building zero touch libraries for the Dynamo Visual Programming language. Copyright Autodesk 2023 @@ -29,4 +27,4 @@ - + \ No newline at end of file