Skip to content

Commit

Permalink
DYN-5996 Project migrations (DynamoDS#14147)
Browse files Browse the repository at this point in the history
* update

* update

* Add GeometryUIWpf.csproj

* Fix GeometryUIWpf.csproj

* Add DataBridgeTests

* Add WorkflowTests

* Move WorkflowTests to Libraries

* Add CommandLineTests

* Add UnitsUI & TestUINodes

* Add CoreNodeTests

* Fix portability

* Fixes

* More fixes

* Update License.rtf

* Fix merge problems.

* update

* update

* Fix merge issue.

* Fix merge issues

* Add references for net48 only

* Fix typo

* Remove duplicated package references

* Fix merge issue

* More tweaks

* Fixing review comments.

* Fix review comments

* Test fixes

---------

Co-authored-by: pinzart <[email protected]>
  • Loading branch information
sm6srw and pinzart authored Jul 14, 2023
1 parent 5080d74 commit 5634759
Show file tree
Hide file tree
Showing 13 changed files with 178 additions and 33 deletions.
49 changes: 49 additions & 0 deletions src/Dynamo.All.Net6.sln
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DocumentationBrowserViewExtension", "DocumentationBrowserViewExtension\DocumentationBrowserViewExtension.csproj", "{BE6D0644-05AF-4580-8597-B95920CE923F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CoreNodeModelsWpf", "Libraries\CoreNodeModelsWpf\CoreNodeModelsWpf.csproj", "{F5932F7D-8E34-4787-80B8-E7F9D996EDFF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorkspaceDependencyViewExtension", "WorkspaceDependencyViewExtension\WorkspaceDependencyViewExtension.csproj", "{5E76AAB3-6302-473E-9655-081B53FB1419}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DynamoWPFCLI", "DynamoWPFCLI\DynamoWPFCLI.csproj", "{F7FD9395-35D5-474D-8AD1-9904817E70D3}"
Expand All @@ -172,6 +173,19 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "System", "System", "{F0BFEE
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IntegrationTests", "..\test\System\IntegrationTests\IntegrationTests.csproj", "{1254D922-643B-4F0B-82BD-E9E02399B040}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeometryUIWpf", "Libraries\GeometryUIWpf\GeometryUIWpf.csproj", "{C068DE76-0651-4F6C-8807-B90EF749D104}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DataBridgeTests", "..\test\Libraries\DataBridgeTests\DataBridgeTests.csproj", "{F0AF3C6E-0E59-4511-A057-79970EA9DC34}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorkflowTests", "..\test\Libraries\WorkflowTests\WorkflowTests.csproj", "{CEA31792-BA09-431B-8ECE-E2F0354B2150}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CommandLineTests", "..\test\Libraries\CommandLineTests\CommandLineTests.csproj", "{3E84B41E-F229-4BF7-8A0F-3D65BA2D00D1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUINodes", "..\test\TestUINodes\TestUINodes.csproj", "{ED1EA294-1BA1-45D6-A669-ECD2E24E21A9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitsUI", "Libraries\UnitsUI\UnitsUI.csproj", "{C67A7E80-73E6-4BBF-9D3F-DCD86CE306BE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CoreNodesTests", "..\test\Libraries\CoreNodesTests\CoreNodesTests.csproj", "{09EC17AF-24D2-4542-A913-0C27AE345C18}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PythonNodeModelsWpf", "Libraries\PythonNodeModelsWpf\PythonNodeModelsWpf.csproj", "{01DE9B06-0BCB-4D8A-862E-E8170F5D6B4F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DynamoServicesTests", "..\test\Libraries\NodeServicesTest\DynamoServicesTests.csproj", "{3E4278F7-60EC-491C-8094-B525C36A51A7}"
Expand Down Expand Up @@ -437,6 +451,34 @@ Global
{1254D922-643B-4F0B-82BD-E9E02399B040}.Debug|NET60_Windows.Build.0 = Debug|NET60_Windows
{1254D922-643B-4F0B-82BD-E9E02399B040}.Release|NET60_Windows.ActiveCfg = Release|NET60_Windows
{1254D922-643B-4F0B-82BD-E9E02399B040}.Release|NET60_Windows.Build.0 = Release|NET60_Windows
{C068DE76-0651-4F6C-8807-B90EF749D104}.Debug|NET60_Windows.ActiveCfg = Debug|NET60_Windows
{C068DE76-0651-4F6C-8807-B90EF749D104}.Debug|NET60_Windows.Build.0 = Debug|NET60_Windows
{C068DE76-0651-4F6C-8807-B90EF749D104}.Release|NET60_Windows.ActiveCfg = Release|NET60_Windows
{C068DE76-0651-4F6C-8807-B90EF749D104}.Release|NET60_Windows.Build.0 = Release|NET60_Windows
{F0AF3C6E-0E59-4511-A057-79970EA9DC34}.Debug|NET60_Windows.ActiveCfg = Debug|NET60_Windows
{F0AF3C6E-0E59-4511-A057-79970EA9DC34}.Debug|NET60_Windows.Build.0 = Debug|NET60_Windows
{F0AF3C6E-0E59-4511-A057-79970EA9DC34}.Release|NET60_Windows.ActiveCfg = Release|NET60_Windows
{F0AF3C6E-0E59-4511-A057-79970EA9DC34}.Release|NET60_Windows.Build.0 = Release|NET60_Windows
{CEA31792-BA09-431B-8ECE-E2F0354B2150}.Debug|NET60_Windows.ActiveCfg = Debug|NET60_Windows
{CEA31792-BA09-431B-8ECE-E2F0354B2150}.Debug|NET60_Windows.Build.0 = Debug|NET60_Windows
{CEA31792-BA09-431B-8ECE-E2F0354B2150}.Release|NET60_Windows.ActiveCfg = Release|NET60_Windows
{CEA31792-BA09-431B-8ECE-E2F0354B2150}.Release|NET60_Windows.Build.0 = Release|NET60_Windows
{3E84B41E-F229-4BF7-8A0F-3D65BA2D00D1}.Debug|NET60_Windows.ActiveCfg = Debug|NET60_Windows
{3E84B41E-F229-4BF7-8A0F-3D65BA2D00D1}.Debug|NET60_Windows.Build.0 = Debug|NET60_Windows
{3E84B41E-F229-4BF7-8A0F-3D65BA2D00D1}.Release|NET60_Windows.ActiveCfg = Release|NET60_Windows
{3E84B41E-F229-4BF7-8A0F-3D65BA2D00D1}.Release|NET60_Windows.Build.0 = Release|NET60_Windows
{ED1EA294-1BA1-45D6-A669-ECD2E24E21A9}.Debug|NET60_Windows.ActiveCfg = Debug|NET60_Windows
{ED1EA294-1BA1-45D6-A669-ECD2E24E21A9}.Debug|NET60_Windows.Build.0 = Debug|NET60_Windows
{ED1EA294-1BA1-45D6-A669-ECD2E24E21A9}.Release|NET60_Windows.ActiveCfg = Release|NET60_Windows
{ED1EA294-1BA1-45D6-A669-ECD2E24E21A9}.Release|NET60_Windows.Build.0 = Release|NET60_Windows
{C67A7E80-73E6-4BBF-9D3F-DCD86CE306BE}.Debug|NET60_Windows.ActiveCfg = Debug|NET60_Windows
{C67A7E80-73E6-4BBF-9D3F-DCD86CE306BE}.Debug|NET60_Windows.Build.0 = Debug|NET60_Windows
{C67A7E80-73E6-4BBF-9D3F-DCD86CE306BE}.Release|NET60_Windows.ActiveCfg = Release|NET60_Windows
{C67A7E80-73E6-4BBF-9D3F-DCD86CE306BE}.Release|NET60_Windows.Build.0 = Release|NET60_Windows
{09EC17AF-24D2-4542-A913-0C27AE345C18}.Debug|NET60_Windows.ActiveCfg = Debug|NET60_Windows
{09EC17AF-24D2-4542-A913-0C27AE345C18}.Debug|NET60_Windows.Build.0 = Debug|NET60_Windows
{09EC17AF-24D2-4542-A913-0C27AE345C18}.Release|NET60_Windows.ActiveCfg = Release|NET60_Windows
{09EC17AF-24D2-4542-A913-0C27AE345C18}.Release|NET60_Windows.Build.0 = Release|NET60_Windows
{01DE9B06-0BCB-4D8A-862E-E8170F5D6B4F}.Debug|NET60_Windows.ActiveCfg = Debug|NET60_Windows
{01DE9B06-0BCB-4D8A-862E-E8170F5D6B4F}.Debug|NET60_Windows.Build.0 = Debug|NET60_Windows
{01DE9B06-0BCB-4D8A-862E-E8170F5D6B4F}.Release|NET60_Windows.ActiveCfg = Release|NET60_Windows
Expand Down Expand Up @@ -508,6 +550,13 @@ Global
{B9E338CA-6677-4772-B01D-1FCEABCDAAAB} = {FA7BE306-A3B0-45FA-9D87-0C69E6932C13}
{F0BFEE09-CE03-42F6-9DF1-DED4D86C2A73} = {5B9B5B6B-0BA7-4606-B8E5-70C958346D57}
{1254D922-643B-4F0B-82BD-E9E02399B040} = {F0BFEE09-CE03-42F6-9DF1-DED4D86C2A73}
{C068DE76-0651-4F6C-8807-B90EF749D104} = {FA7BE306-A3B0-45FA-9D87-0C69E6932C13}
{F0AF3C6E-0E59-4511-A057-79970EA9DC34} = {4CA0BC62-DCB3-456B-80D6-348247640BAB}
{CEA31792-BA09-431B-8ECE-E2F0354B2150} = {4CA0BC62-DCB3-456B-80D6-348247640BAB}
{3E84B41E-F229-4BF7-8A0F-3D65BA2D00D1} = {4CA0BC62-DCB3-456B-80D6-348247640BAB}
{ED1EA294-1BA1-45D6-A669-ECD2E24E21A9} = {5B9B5B6B-0BA7-4606-B8E5-70C958346D57}
{C67A7E80-73E6-4BBF-9D3F-DCD86CE306BE} = {FA7BE306-A3B0-45FA-9D87-0C69E6932C13}
{09EC17AF-24D2-4542-A913-0C27AE345C18} = {4CA0BC62-DCB3-456B-80D6-348247640BAB}
{01DE9B06-0BCB-4D8A-862E-E8170F5D6B4F} = {FA7BE306-A3B0-45FA-9D87-0C69E6932C13}
{3E4278F7-60EC-491C-8094-B525C36A51A7} = {4CA0BC62-DCB3-456B-80D6-348247640BAB}
EndGlobalSection
Expand Down
2 changes: 1 addition & 1 deletion src/Libraries/CoreNodes/CoreNodes.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
<Target Name="CopyFiles" BeforeTargets="ResolveSateliteResDeps">
<Copy SourceFiles="$(ProjectDir)DSCoreNodes_DynamoCustomization.xml" DestinationFolder="$(OutputPath)" />
</Target>
<Target Name="GenerateFiles" AfterTargets="Build" Condition=" '$(OS)' != 'Unix' ">
<Target Name="GenerateFiles" AfterTargets="ResolveSateliteResDeps" Condition=" '$(OS)' != 'Unix' ">
<!-- Get assembly -->
<GetAssemblyIdentity AssemblyFiles="$(OutDir)$(TargetName).dll">
<Output TaskParameter="Assemblies" ItemName="AssemblyInfo" />
Expand Down
16 changes: 9 additions & 7 deletions src/Libraries/GeometryUIWpf/GeometryUIWpf.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<UILib>true</UILib>
</PropertyGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(SolutionDir)Config\CS_SDK.props" />
</ImportGroup>
Expand All @@ -9,6 +12,7 @@
<RootNamespace>GeometryUIWpf</RootNamespace>
<AssemblyName>GeometryUIWpf</AssemblyName>
<OutputPath>$(OutputPath)\nodes\</OutputPath>
<EnableDefaultPageItems>false</EnableDefaultPageItems>
</PropertyGroup>
<ItemDefinitionGroup>
<ReferenceCopyLocalPaths>
Expand All @@ -18,6 +22,8 @@
</ItemDefinitionGroup>
<ItemGroup>
<PackageReference Include="DynamoVisualProgramming.LibG_229_0_0" Version="2.18.0.1400" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net48' ">
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System.Xaml" />
Expand Down Expand Up @@ -88,17 +94,13 @@
<LastGenOutput>Resources.en-US.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<Target Name="GenerateFiles" AfterTargets="Build">
<!-- Get System.Drawing.dll -->
<GetReferenceAssemblyPaths TargetFrameworkMoniker=".NETFramework, Version=$(ResourceGeneration_FrameworkVersion)">
<Output TaskParameter="FullFrameworkReferenceAssemblyPaths" PropertyName="FrameworkAssembliesPath" />
</GetReferenceAssemblyPaths>
<Target Name="GenerateFiles" AfterTargets="ResolveSateliteResDeps">
<!-- Get ProtoGeometry -->
<GetAssemblyIdentity AssemblyFiles="$(OutDir)..\ProtoGeometry.dll">
<Output TaskParameter="Assemblies" ItemName="ProtoGeometryInfo" />
</GetAssemblyIdentity>
<!-- Generate customization dll for ProtoGeometry -->
<GenerateResource SdkToolsPath="$(TargetFrameworkSDKToolsDirectory)" UseSourcePath="true" Sources="$(ProjectDir)ProtoGeometryImages.resx" OutputResources="$(ProjectDir)ProtoGeometryImages.resources" References="$(FrameworkAssembliesPath)System.Drawing.dll" />
<GenerateResource SdkToolsPath="$(TargetFrameworkSDKToolsDirectory)" UseSourcePath="true" Sources="$(ProjectDir)ProtoGeometryImages.resx" OutputResources="$(ProjectDir)ProtoGeometryImages.resources" References="$(SystemDrawingDllPath)" />
<AL SdkToolsPath="$(TargetFrameworkSDKToolsDirectory)" TargetType="library" EmbedResources="$(ProjectDir)ProtoGeometryImages.resources" OutputAssembly="$(OutDir)..\ProtoGeometry.customization.dll" Version="%(ProtoGeometryInfo.Version)" />
</Target>
</Project>
16 changes: 9 additions & 7 deletions src/Libraries/UnitsUI/UnitsUI.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<UILib>true</UILib>
</PropertyGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(SolutionDir)Config\CS_SDK.props" />
</ImportGroup>
Expand All @@ -9,6 +12,7 @@
<RootNamespace>UnitsUI</RootNamespace>
<AssemblyName>UnitsUI</AssemblyName>
<OutputPath>$(OutputPath)\nodes\</OutputPath>
<EnableDefaultPageItems>false</EnableDefaultPageItems>
</PropertyGroup>
<ItemDefinitionGroup>
<ReferenceCopyLocalPaths>
Expand All @@ -18,6 +22,8 @@
</ItemDefinitionGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net48' ">
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System.Xaml" />
Expand Down Expand Up @@ -93,17 +99,13 @@
<LastGenOutput>Resources.en-US.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<Target Name="GenerateFiles" AfterTargets="Build" Condition=" '$(OS)' != 'Unix' ">
<!-- Get System.Drawing.dll -->
<GetReferenceAssemblyPaths TargetFrameworkMoniker=".NETFramework, Version=$(ResourceGeneration_FrameworkVersion)">
<Output TaskParameter="FullFrameworkReferenceAssemblyPaths" PropertyName="FrameworkAssembliesPath" />
</GetReferenceAssemblyPaths>
<Target Name="GenerateFiles" AfterTargets="ResolveSateliteResDeps" Condition=" '$(OS)' != 'Unix' ">
<!-- Get assembly -->
<GetAssemblyIdentity AssemblyFiles="$(OutDir)$(TargetName).dll">
<Output TaskParameter="Assemblies" ItemName="AssemblyInfo" />
</GetAssemblyIdentity>
<!-- Generate customization dll -->
<GenerateResource SdkToolsPath="$(TargetFrameworkSDKToolsDirectory)" UseSourcePath="true" Sources="$(ProjectDir)UnitsUIImages.resx" OutputResources="$(ProjectDir)UnitsUIImages.resources" References="$(FrameworkAssembliesPath)System.Drawing.dll" />
<GenerateResource SdkToolsPath="$(TargetFrameworkSDKToolsDirectory)" UseSourcePath="true" Sources="$(ProjectDir)UnitsUIImages.resx" OutputResources="$(ProjectDir)UnitsUIImages.resources" References="$(SystemDrawingDllPath)" />
<AL SdkToolsPath="$(TargetFrameworkSDKToolsDirectory)" TargetType="library" EmbedResources="$(ProjectDir)UnitsUIImages.resources" OutputAssembly="$(OutDir)UnitsUI.customization.dll" Version="%(AssemblyInfo.Version)" />
</Target>
</Project>
</Project>
28 changes: 26 additions & 2 deletions test/Libraries/CommandLineTests/CommandLineTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading;
using System.Xml;
using Dynamo.Applications;
using Dynamo.ViewModels;
Expand Down Expand Up @@ -221,7 +222,13 @@ public void CanOpenAndRunFileWithDictionaryCorrectlyToOutputFileFromDynamoCLIexe
//
// DynamoWPFCLI Tests
//

#if NET6_0_OR_GREATER
[Test]
[Apartment(ApartmentState.STA)]
#else
[Test, RequiresSTA]
#endif
public void CanOpenAndRunDynamoModelWithWPFCommandLineRunner()
{
string openpath = Path.Combine(TestDirectory, @"core\math\Add.dyn");
Expand All @@ -244,7 +251,12 @@ public void CanOpenAndRunDynamoModelWithWPFCommandLineRunner()
AssertPreviewValue("4c5889ac-7b91-4fb5-aaad-a2128b533279", 4.0);
}

#if NET6_0_OR_GREATER
[Test]
[Apartment(ApartmentState.STA)]
#else
[Test, RequiresSTA]
#endif
public void CanOpenAndRunFileWihtListsCorrectlyToOutputFileFromDynamoWPFCLIexe()
{
string openpath = Path.Combine(TestDirectory, @"core\commandline\simplelists.dyn");
Expand All @@ -261,7 +273,12 @@ public void CanOpenAndRunFileWihtListsCorrectlyToOutputFileFromDynamoWPFCLIexe()
output);
}

#if NET6_0_OR_GREATER
[Test]
[Apartment(ApartmentState.STA)]
#else
[Test, RequiresSTA]
#endif
public void CanOpenAndRunFileWithDictionaryCorrectlyToOutputFileFromDynamoWPFCLIexe()
{
string openpath = Path.Combine(TestDirectory, @"core\commandline\simpleDict.dyn");
Expand All @@ -284,7 +301,12 @@ public void CanOpenAndRunFileWithDictionaryCorrectlyToOutputFileFromDynamoWPFCLI
}, output);
}

#if NET6_0_OR_GREATER
[Test]
[Apartment(ApartmentState.STA)]
#else
[Test, RequiresSTA]
#endif
public void CanOpenAndRunFileWithCustomNodeAndOutputGeometryFromDynamoWPFCLIexe()
{
string openpath = Path.Combine(TestDirectory, @"core\commandline\GeometryTest.dyn");
Expand All @@ -304,10 +326,12 @@ public void CanOpenAndRunFileWithCustomNodeAndOutputGeometryFromDynamoWPFCLIexe(
Assert.IsNotNull(newFile);
var newGeometry = newFile.ReadToEnd();

Assert.IsNotNullOrEmpty(geometry);
Assert.IsNotNull(geometry);
Assert.IsNotEmpty(geometry);
var geometryJson = JsonConvert.DeserializeObject(geometry) as JArray;

Assert.IsNotNullOrEmpty(newGeometry);
Assert.IsNotNull(newGeometry);
Assert.IsNotEmpty(newGeometry);
var newGeometryJson = JsonConvert.DeserializeObject(newGeometry) as JArray;

Assert.IsNotNull(geometryJson);
Expand Down
13 changes: 12 additions & 1 deletion test/Libraries/CommandLineTests/CommandLineTests.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<UILib>true</UILib>
</PropertyGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(SolutionDir)Config/CS_SDK.props" />
</ImportGroup>
Expand All @@ -10,10 +13,13 @@
<AssemblyName>CommandLineTests</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<PackageReference Include="Prism.Core" Version="8.1.97" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net48' ">
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="NUnit" Version="2.6.3" />
<PackageReference Include="NUnitTestAdapter" Version="2.3.0" ExcludeAssets="all" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
Expand All @@ -22,6 +28,11 @@
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<!--net6.0 net8.0 etc-->
<ItemGroup Condition=" '$(TargetFramework)' != 'net48' ">
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\DynamoApplications\DynamoApplications.csproj">
<Project>{aa782772-fe61-4226-baa4-eb529fa1646b}</Project>
Expand Down
16 changes: 13 additions & 3 deletions test/Libraries/CoreNodesTests/CoreNodesTests.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<UILib>true</UILib>
</PropertyGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(SolutionDir)Config/CS_SDK.props" />
</ImportGroup>
Expand All @@ -12,16 +15,23 @@
<AssemblyName>DSCoreNodesTests</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Moq" Version="4.18.4"/>
<PackageReference Include="NUnit" Version="2.6.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<PackageReference Include="Moq" Version="4.18.4"/>
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net48' ">
<PackageReference Include="NUnit" Version="2.6.3" />
<PackageReference Include="DynamoVisualProgramming.LibG_229_0_0" Version="2.18.0.1400"/>
<PackageReference Include="NUnitTestAdapter" Version="2.3.0" ExcludeAssets="all" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Xml" />
</ItemGroup>
<!--net6.0 net8.0 etc-->
<ItemGroup Condition=" '$(TargetFramework)' != 'net48' ">
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\DynamoCoreWpf\DynamoCoreWpf.csproj">
<Project>{51BB6014-43F7-4F31-B8D3-E3C37EBEDAF4}</Project>
Expand Down
8 changes: 8 additions & 0 deletions test/Libraries/CoreNodesTests/Setup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ public class Setup
{
private AssemblyHelper assemblyHelper;

#if NETFRAMEWORK
[SetUp]
#elif NET6_0_OR_GREATER
[OneTimeSetUp]
#endif
public void SetUp()
{
var assemblyPath = Assembly.GetExecutingAssembly().Location;
Expand All @@ -28,7 +32,11 @@ public void SetUp()
AppDomain.CurrentDomain.AssemblyResolve += assemblyHelper.ResolveAssembly;
}

#if NETFRAMEWORK
[TearDown]
#elif NET6_0_OR_GREATER
[OneTimeTearDown]
#endif
public void TearDown()
{
AppDomain.CurrentDomain.AssemblyResolve -= assemblyHelper.ResolveAssembly;
Expand Down
5 changes: 3 additions & 2 deletions test/Libraries/CoreNodesTests/WebTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using DSCore;
using NUnit.Framework;

Expand Down Expand Up @@ -27,7 +27,8 @@ public void WebRequest_GitHubAPI()
{
string url = "https://api.github.com/rate_limit";
string result = Web.WebRequestByUrl(url);
Assert.IsNotNullOrEmpty(result);
Assert.IsNotNull(result);
Assert.IsNotEmpty(result);
}
}
}
Loading

0 comments on commit 5634759

Please sign in to comment.