Skip to content

Commit

Permalink
Bump NUnit from 3.14.0 to 4.1.0 (#2535)
Browse files Browse the repository at this point in the history
* Bump NUnit from 3.14.0 to 4.1.0

Bumps [NUnit](https://github.com/nunit/nunit) from 3.14.0 to 4.1.0.
- [Release notes](https://github.com/nunit/nunit/releases)
- [Changelog](https://github.com/nunit/nunit/blob/master/CHANGES.md)
- [Commits](nunit/nunit@v3.14.0...4.1.0)

---
updated-dependencies:
- dependency-name: NUnit
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix Build by adding: using Assert = NUnit.Framework.Legacy.ClassicAssert;

Co-authored-by: Roman Ettlinger <romanett98@gmail.com>
  • Loading branch information
dependabot[bot] and romanett committed Apr 22, 2024
1 parent d1a9baa commit 60689c9
Show file tree
Hide file tree
Showing 85 changed files with 143 additions and 32 deletions.
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="NUnit.Console" Version="3.17.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0">
<PrivateAssets>all</PrivateAssets>
Expand Down
Expand Up @@ -40,6 +40,8 @@
using Opc.Ua.Server.Tests;
using Quickstarts;
using Quickstarts.ReferenceServer;
using Assert = NUnit.Framework.Legacy.ClassicAssert;


namespace Opc.Ua.Client.ComplexTypes.Tests
{
Expand Down Expand Up @@ -124,7 +126,7 @@ public async Task OneTimeSetUpAsync(TextWriter writer = null)
}
catch (Exception e)
{
Assert.Ignore("OneTimeSetup failed to create session, tests skipped. Error: {0}", e.Message);
Assert.Ignore($"OneTimeSetup failed to create session, tests skipped. Error: {e.Message}");
}
}

Expand Down
Expand Up @@ -37,6 +37,7 @@
using NUnit.Framework;
using Opc.Ua.Core.Tests.Types.Encoders;
using Opc.Ua.Test;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

namespace Opc.Ua.Client.ComplexTypes.Tests.Types
{
Expand Down
Expand Up @@ -30,6 +30,7 @@
using System;
using NUnit.Framework;
using Opc.Ua.Core.Tests.Types.Encoders;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

namespace Opc.Ua.Client.ComplexTypes.Tests.Types
{
Expand Down
Expand Up @@ -35,6 +35,7 @@
using Newtonsoft.Json.Linq;
using NUnit.Framework;
using Opc.Ua.Core.Tests.Types.Encoders;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

namespace Opc.Ua.Client.ComplexTypes.Tests.Types
{
Expand Down
Expand Up @@ -37,6 +37,7 @@
using System.Threading.Tasks;
using NUnit.Framework;
using Opc.Ua.Core.Tests.Types.Encoders;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

namespace Opc.Ua.Client.ComplexTypes.Tests.Types
{
Expand Down Expand Up @@ -681,7 +682,7 @@ private object GetRandom(NodeId valueType)
}
else
{
Assert.Fail("Unexpected ValueType {0}", valueType);
Assert.Fail($"Unexpected ValueType {valueType}");
}
return null;
}
Expand Down
6 changes: 4 additions & 2 deletions Tests/Opc.Ua.Client.Tests/ClientTest.cs
Expand Up @@ -44,6 +44,8 @@
using Opc.Ua.Bindings;
using Opc.Ua.Configuration;
using Opc.Ua.Server.Tests;
using Assert = NUnit.Framework.Legacy.ClassicAssert;


namespace Opc.Ua.Client.Tests
{
Expand Down Expand Up @@ -283,7 +285,7 @@ public void ReadOnDiscoveryChannel(int readCount)
// client may report channel closed instead of security policy rejected
if (StatusCodes.BadSecureChannelClosed == sre.StatusCode)
{
Assert.Inconclusive("Unexpected Status: {0}", sre);
Assert.Inconclusive($"Unexpected Status: {sre}" );
}
Assert.AreEqual(StatusCodes.BadSecurityPolicyRejected, sre.StatusCode, "Unexpected Status: {0}", sre);
}
Expand Down Expand Up @@ -312,7 +314,7 @@ public void GetEndpointsOnDiscoveryChannel()
// client may report channel closed instead of security policy rejected
if (StatusCodes.BadSecureChannelClosed == sre.StatusCode)
{
Assert.Inconclusive("Unexpected Status: {0}", sre);
Assert.Inconclusive($"Unexpected Status: {sre}" );
}
Assert.AreEqual(StatusCodes.BadSecurityPolicyRejected, sre.StatusCode, "Unexpected Status: {0}", sre);
}
Expand Down
5 changes: 3 additions & 2 deletions Tests/Opc.Ua.Client.Tests/ClientTestFramework.cs
Expand Up @@ -38,6 +38,7 @@
using NUnit.Framework;
using Opc.Ua.Server.Tests;
using Quickstarts.ReferenceServer;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

namespace Opc.Ua.Client.Tests
{
Expand Down Expand Up @@ -187,7 +188,7 @@ public async Task OneTimeSetUpAsync(TextWriter writer = null, bool securityNone
}
catch (Exception e)
{
Assert.Warn("OneTimeSetup failed to create session with {0}, tests fail. Error: {1}", ServerUrl, e.Message);
Assert.Warn($"OneTimeSetup failed to create session with {ServerUrl}, tests fail. Error: {e.Message}");
}
}
}
Expand Down Expand Up @@ -224,7 +225,7 @@ public async Task SetUp()
}
catch (Exception e)
{
Assert.Ignore("OneTimeSetup failed to create session, tests skipped. Error: {0}", e.Message);
Assert.Ignore($"OneTimeSetup failed to create session, tests skipped. Error: {e.Message}");
}
}
if (ServerFixture == null)
Expand Down
2 changes: 2 additions & 0 deletions Tests/Opc.Ua.Client.Tests/NodeCacheAsyncTest.cs
Expand Up @@ -35,6 +35,8 @@
using BenchmarkDotNet.Attributes;
using NUnit.Framework;
using Opc.Ua.Server.Tests;
using Assert = NUnit.Framework.Legacy.ClassicAssert;


namespace Opc.Ua.Client.Tests
{
Expand Down
2 changes: 2 additions & 0 deletions Tests/Opc.Ua.Client.Tests/NodeCacheTest.cs
Expand Up @@ -35,6 +35,8 @@
using BenchmarkDotNet.Attributes;
using NUnit.Framework;
using Opc.Ua.Server.Tests;
using Assert = NUnit.Framework.Legacy.ClassicAssert;


namespace Opc.Ua.Client.Tests
{
Expand Down
2 changes: 1 addition & 1 deletion Tests/Opc.Ua.Client.Tests/Opc.Ua.Client.Tests.csproj
Expand Up @@ -10,7 +10,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="NUnit.Console" Version="3.17.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0">
<PrivateAssets>all</PrivateAssets>
Expand Down
1 change: 1 addition & 0 deletions Tests/Opc.Ua.Client.Tests/RequestHeaderTest.cs
Expand Up @@ -5,6 +5,7 @@
using System.Threading.Tasks;
using BenchmarkDotNet.Attributes;
using NUnit.Framework;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

namespace Opc.Ua.Client.Tests
{
Expand Down
2 changes: 2 additions & 0 deletions Tests/Opc.Ua.Client.Tests/ReverseConnectTest.cs
Expand Up @@ -36,6 +36,8 @@
using NUnit.Framework;
using Opc.Ua.Server.Tests;
using Quickstarts.ReferenceServer;
using Assert = NUnit.Framework.Legacy.ClassicAssert;


namespace Opc.Ua.Client.Tests
{
Expand Down
2 changes: 2 additions & 0 deletions Tests/Opc.Ua.Client.Tests/SessionClientBatchTest.cs
Expand Up @@ -34,6 +34,8 @@
using BenchmarkDotNet.Attributes;
using NUnit.Framework;
using Opc.Ua.Server.Tests;
using Assert = NUnit.Framework.Legacy.ClassicAssert;


namespace Opc.Ua.Client.Tests
{
Expand Down
8 changes: 5 additions & 3 deletions Tests/Opc.Ua.Client.Tests/SubscriptionTest.cs
Expand Up @@ -37,6 +37,8 @@
using System.Threading;
using System.Threading.Tasks;
using NUnit.Framework;
using Assert = NUnit.Framework.Legacy.ClassicAssert;


namespace Opc.Ua.Client.Tests
{
Expand Down Expand Up @@ -303,7 +305,7 @@ public async Task AddSubscriptionAsync()
[Test, Order(200)]
public async Task LoadSubscriptionAsync()
{
if (!File.Exists(m_subscriptionTestXml)) Assert.Ignore("Save file {0} does not exist yet", m_subscriptionTestXml);
if (!File.Exists(m_subscriptionTestXml)) Assert.Ignore($"Save file {m_subscriptionTestXml} does not exist yet");

// load
var subscriptions = Session.Load(m_subscriptionTestXml, false, new[] { typeof(TestableSubscription) });
Expand Down Expand Up @@ -343,7 +345,7 @@ public async Task LoadSubscriptionAsync()
}

[Theory, Order(300)]
[Timeout(30_000)]
[CancelAfter(30_000)]
/// <remarks>
/// This test doesn't deterministically prove sequential publishing,
/// but rather relies on a subscription not being able to handle the message load.
Expand Down Expand Up @@ -694,7 +696,7 @@ public void SequentialPublishingSubscription(bool enabled)
}

[Test, Order(400)]
[Timeout(30_000)]
[CancelAfter(30_000)]
public async Task PublishRequestCount()
{
var subscriptionList = new List<Subscription>();
Expand Down
2 changes: 2 additions & 0 deletions Tests/Opc.Ua.Client.Tests/TraceableRequestHeaderTest.cs
Expand Up @@ -5,6 +5,8 @@
using System.Threading.Tasks;
using BenchmarkDotNet.Attributes;
using NUnit.Framework;
using Assert = NUnit.Framework.Legacy.ClassicAssert;


namespace Opc.Ua.Client.Tests
{
Expand Down
Expand Up @@ -35,6 +35,7 @@
using System.Threading;
using System.Threading.Tasks;
using NUnit.Framework;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

namespace Opc.Ua.Configuration.Tests
{
Expand Down
Expand Up @@ -34,6 +34,7 @@
using System.Threading.Tasks;
using NUnit.Framework;
using Opc.Ua.Security.Certificates;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

namespace Opc.Ua.Configuration.Tests
{
Expand Down
Expand Up @@ -9,7 +9,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="NUnit.Console" Version="3.17.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0">
<PrivateAssets>all</PrivateAssets>
Expand Down
2 changes: 1 addition & 1 deletion Tests/Opc.Ua.Core.Tests/Opc.Ua.Core.Tests.csproj
Expand Up @@ -12,7 +12,7 @@
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="Moq" Version="4.20.70" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="NUnit.Console" Version="3.17.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0">
<PrivateAssets>all</PrivateAssets>
Expand Down
Expand Up @@ -37,6 +37,8 @@
using NUnit.Framework;
using Opc.Ua.Security.Certificates;
using Opc.Ua.Security.Certificates.Tests;
using Assert = NUnit.Framework.Legacy.ClassicAssert;


namespace Opc.Ua.Core.Tests.Security.Certificates
{
Expand Down
Expand Up @@ -35,6 +35,8 @@
using System.Security.Cryptography.X509Certificates;
using System.Threading.Tasks;
using NUnit.Framework;
using Assert = NUnit.Framework.Legacy.ClassicAssert;


namespace Opc.Ua.Core.Tests.Security.Certificates
{
Expand Down
Expand Up @@ -4,6 +4,8 @@
using System.Threading.Tasks;
using NUnit.Framework;
using Opc.Ua.Security.Certificates;
using Assert = NUnit.Framework.Legacy.ClassicAssert;


namespace Opc.Ua.Core.Tests.Security.Certificates
{
Expand Down
Expand Up @@ -41,6 +41,8 @@
using EmbedIO.Actions;
using NUnit.Framework;
using Opc.Ua.Security.Certificates;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

#if !ECC_SUPPORT
using X509SignatureGenerator = Opc.Ua.Security.Certificates.X509SignatureGenerator;
#endif
Expand Down Expand Up @@ -145,7 +147,7 @@ public async Task OneTimeSetUpAsync()
}
catch
{
Assert.Ignore("Web server could not start at: {0}", m_webServerUrl);
Assert.Ignore($"Web server could not start at: {m_webServerUrl}");
}
}

Expand Down Expand Up @@ -304,7 +306,7 @@ public void AlternateRootCertificateWithAuthorityKeyID(bool subjectKeyIdentifier
/// <summary>
/// Validate a chain with a loop is detected.
/// </summary>
[Test, Timeout(10000)]
[Test, CancelAfter(10000)]
public async Task VerifyLoopChainIsDetected()
{
const string rootSubject = "CN=Root";
Expand Down
Expand Up @@ -39,6 +39,8 @@
using System.Threading.Tasks;
using NUnit.Framework;
using Opc.Ua.Security.Certificates;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

#if NETCOREAPP2_1 || !ECC_SUPPORT
using X509SignatureGenerator = Opc.Ua.Security.Certificates.X509SignatureGenerator;
#endif
Expand Down
2 changes: 2 additions & 0 deletions Tests/Opc.Ua.Core.Tests/Stack/Client/ClientTests.cs
Expand Up @@ -34,6 +34,8 @@
using System.Xml;
using NUnit.Framework;
using Opc.Ua.Tests;
using Assert = NUnit.Framework.Legacy.ClassicAssert;


namespace Opc.Ua.Core.Tests.Stack.Client
{
Expand Down
2 changes: 2 additions & 0 deletions Tests/Opc.Ua.Core.Tests/Stack/Schema/UANodeSetHelpersTests.cs
Expand Up @@ -34,6 +34,8 @@
using System.Xml;
using NUnit.Framework;
using Opc.Ua.Tests;
using Assert = NUnit.Framework.Legacy.ClassicAssert;


namespace Opc.Ua.Core.Tests.Stack.Schema
{
Expand Down
1 change: 1 addition & 0 deletions Tests/Opc.Ua.Core.Tests/Stack/Server/ServerBaseTests.cs
Expand Up @@ -30,6 +30,7 @@
using System;
using System.Linq;
using NUnit.Framework;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

namespace Opc.Ua.Core.Tests.Stack.Server
{
Expand Down
Expand Up @@ -3,6 +3,7 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using NUnit.Framework;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

namespace Opc.Ua.Core.Tests.Stack.State
{
Expand Down
Expand Up @@ -4,6 +4,8 @@
using System.Threading;
using System.Threading.Tasks;
using NUnit.Framework;
using Assert = NUnit.Framework.Legacy.ClassicAssert;


namespace Opc.Ua.Core.Tests.Stack.State
{
Expand Down
1 change: 1 addition & 0 deletions Tests/Opc.Ua.Core.Tests/Stack/State/NodeStateTests.cs
Expand Up @@ -31,6 +31,7 @@
using System.Linq;
using System.Reflection;
using NUnit.Framework;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

namespace Opc.Ua.Core.Tests.Stack.State
{
Expand Down
Expand Up @@ -7,6 +7,7 @@
using Moq;
using NUnit.Framework;
using Opc.Ua.Bindings;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

namespace Opc.Ua.Core.Tests.Stack.Transport
{
Expand Down
2 changes: 2 additions & 0 deletions Tests/Opc.Ua.Core.Tests/Stack/Types/WriteValueTests.cs
Expand Up @@ -31,6 +31,8 @@
using System.Linq;
using NUnit.Framework;
using Opc.Ua.Test;
using Assert = NUnit.Framework.Legacy.ClassicAssert;


namespace Opc.Ua.Core.Tests.Stack.Types
{
Expand Down
2 changes: 2 additions & 0 deletions Tests/Opc.Ua.Core.Tests/Types/BuiltIn/BuiltInTests.cs
Expand Up @@ -32,6 +32,8 @@
using System.Linq;
using NUnit.Framework;
using Opc.Ua.Test;
using Assert = NUnit.Framework.Legacy.ClassicAssert;


namespace Opc.Ua.Core.Tests.Types.BuiltIn
{
Expand Down

0 comments on commit 60689c9

Please sign in to comment.