Skip to content

Commit

Permalink
SNOW-1473274 bump nunit to 4.1.0 (#971)
Browse files Browse the repository at this point in the history
### Description
SNOW-1473274 Bump nunit to 4.1.0

### Checklist
- [x] Code compiles correctly
- [x] Code is formatted according to [Coding
Conventions](../blob/master/CodingConventions.md)
- [x] Created tests which fail without the change (if possible)
- [x] All tests passing (`dotnet test`)
- [x] Extended the README / documentation, if necessary
- [x] Provide JIRA issue id (if possible) or GitHub issue id in PR name
  • Loading branch information
sfc-gh-knozderko authored Jun 11, 2024
1 parent db8e4d5 commit 0e7a4ad
Show file tree
Hide file tree
Showing 63 changed files with 76 additions and 15 deletions.
1 change: 1 addition & 0 deletions Snowflake.Data.Tests/IcebergTests/TestIcebergTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using Snowflake.Data.Client;
using Snowflake.Data.Core;
using Snowflake.Data.Tests.Util;
using Assert = NUnit.Framework.Legacy.ClassicAssert;
using static Snowflake.Data.Tests.Util.TestData;

namespace Snowflake.Data.Tests.IcebergTests
Expand Down
1 change: 1 addition & 0 deletions Snowflake.Data.Tests/IntegrationTests/EasyLoggingIT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Snowflake.Data.Configuration;
using Snowflake.Data.Core;
using Snowflake.Data.Log;
using Assert = NUnit.Framework.Legacy.ClassicAssert;
using static Snowflake.Data.Tests.UnitTests.Configuration.EasyLoggingConfigGenerator;

namespace Snowflake.Data.Tests.IntegrationTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using NUnit.Framework;
using Snowflake.Data.Client;
using Snowflake.Data.Tests.Util;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

namespace Snowflake.Data.Tests
{
Expand Down
1 change: 1 addition & 0 deletions Snowflake.Data.Tests/IntegrationTests/MaxLobSizeIT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using System.Data.Common;
using System.IO;
using System.Linq;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

namespace Snowflake.Data.Tests.IntegrationTests
{
Expand Down
3 changes: 2 additions & 1 deletion Snowflake.Data.Tests/IntegrationTests/SFBindTestIT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@
using System.Globalization;
using System.Collections.Generic;
using Snowflake.Data.Tests.Util;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

namespace Snowflake.Data.Tests.IntegrationTests
{

[TestFixture]
[TestFixture]
class SFBindTestIT : SFBaseTest
{
private static readonly SFLogger s_logger = SFLoggerFactory.GetLogger<SFBindTestIT>();
Expand Down
4 changes: 3 additions & 1 deletion Snowflake.Data.Tests/IntegrationTests/SFConnectionIT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ namespace Snowflake.Data.Tests.IntegrationTests
using Snowflake.Data.Tests.Mock;
using System.Runtime.InteropServices;
using System.Net.Http;
using NUnit.Framework.Legacy;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

[TestFixture]
class SFConnectionIT : SFBaseTest
Expand Down Expand Up @@ -799,7 +801,7 @@ public void TestUnknownAuthenticator()
IDbConnection conn = new SnowflakeDbConnection();
conn.ConnectionString = "scheme=http;host=test;port=8080;user=test;password=test;account=test;authenticator=" + wrongAuthenticator;
conn.Open();
Assert.Fail("Authentication of {0} should fail", wrongAuthenticator);
Assert.Fail($"Authentication of {wrongAuthenticator} should fail");
}
catch (SnowflakeDbException e)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
using System.Threading.Tasks;
using Snowflake.Data.Client;
using Snowflake.Data.Core;
using Snowflake.Data.Log;
using Snowflake.Data.Tests.Mock;
using Moq;
using NUnit.Framework;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

namespace Snowflake.Data.Tests.IntegrationTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using Snowflake.Data.Log;
using NUnit.Framework;
using Snowflake.Data.Core.Session;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

namespace Snowflake.Data.Tests.IntegrationTests
{
Expand Down
1 change: 1 addition & 0 deletions Snowflake.Data.Tests/IntegrationTests/SFDbAdaptorIT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace Snowflake.Data.Tests.IntegrationTests
using Snowflake.Data.Client;
using System.Data;
using System.Runtime.InteropServices;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

[TestFixture]
class SFDbAdaptorIT : SFBaseTest
Expand Down
1 change: 1 addition & 0 deletions Snowflake.Data.Tests/IntegrationTests/SFDbCommandIT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ namespace Snowflake.Data.Tests.IntegrationTests
using System.Globalization;
using Snowflake.Data.Tests.Mock;
using Snowflake.Data.Core;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

[TestFixture]
class SFDbCommandITAsync : SFBaseTestAsync
Expand Down
1 change: 1 addition & 0 deletions Snowflake.Data.Tests/IntegrationTests/SFDbDataReaderIT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using Snowflake.Data.Client;
using Snowflake.Data.Core;
using Snowflake.Data.Tests.Util;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

namespace Snowflake.Data.Tests.IntegrationTests
{
Expand Down
1 change: 1 addition & 0 deletions Snowflake.Data.Tests/IntegrationTests/SFDbFactoryIT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace Snowflake.Data.Tests.IntegrationTests
using NUnit.Framework;
using System.Data;
using System.Data.Common;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

[TestFixture]
class SFDbFactoryIT : SFBaseTest
Expand Down
1 change: 1 addition & 0 deletions Snowflake.Data.Tests/IntegrationTests/SFDbTransactionIT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace Snowflake.Data.Tests.IntegrationTests
using Snowflake.Data.Client;
using Snowflake.Data.Core;
using System.Threading.Tasks;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

[TestFixture]
class SFDbTransactionIT : SFBaseTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace Snowflake.Data.Tests.IntegrationTests
using Snowflake.Data.Client;
using Snowflake.Data.Core;
using NUnit.Framework;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

[TestFixture]
class SFMultiStatementsIT : SFBaseTest
Expand Down
1 change: 1 addition & 0 deletions Snowflake.Data.Tests/IntegrationTests/SFPutGetTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ namespace Snowflake.Data.Tests.IntegrationTests
using Snowflake.Data.Client;
using Snowflake.Data.Core;
using Snowflake.Data.Core.FileTransfer;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

[TestFixture]
[Parallelizable(ParallelScope.Children)]
Expand Down
3 changes: 2 additions & 1 deletion Snowflake.Data.Tests/IntegrationTests/SFReusableChunkTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ namespace Snowflake.Data.Tests.IntegrationTests
using Core;
using Client;
using System.Threading.Tasks;

using Assert = NUnit.Framework.Legacy.ClassicAssert;

[TestFixture, NonParallelizable]
class SFReusableChunkTest : SFBaseTest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace Snowflake.Data.Tests.IntegrationTests
using System.Data;
using Snowflake.Data.Client;
using System.Data.Common;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

[TestFixture]
class SFStatementTypeTest : SFBaseTest
Expand Down
7 changes: 4 additions & 3 deletions Snowflake.Data.Tests/SFBaseTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ namespace Snowflake.Data.Tests
using NUnit.Framework.Interfaces;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

/*
* This is the base class for all tests that call blocking methods in the library - it uses MockSynchronizationContext to verify that
* This is the base class for all tests that call blocking methods in the library - it uses MockSynchronizationContext to verify that
* there are no async deadlocks in the library
*
*
*/
[TestFixture]
public class SFBaseTest : SFBaseTestAsync
Expand Down Expand Up @@ -433,7 +434,7 @@ public void BeforeTest(ITest test)
{
if (Environment.GetEnvironmentVariable(_key) == value)
{
Assert.Ignore("Test is ignored when environment variable {0} is {1} ", _key, value);
Assert.Ignore($"Test is ignored when environment variable {_key} is {value} ");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Snowflake.Data.Tests/Snowflake.Data.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<PackageReference Include="JunitXml.TestLogger" Version="3.1.12" />
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.1" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="RichardSzalay.MockHttp" Version="6.0.0" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
Expand Down
1 change: 1 addition & 0 deletions Snowflake.Data.Tests/UnitTests/ArrowChunkParserTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ namespace Snowflake.Data.Tests.UnitTests
using System.IO;
using System.Text;
using System.Threading.Tasks;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

[TestFixture, NonParallelizable]
class ArrowChunkParserTest
Expand Down
1 change: 1 addition & 0 deletions Snowflake.Data.Tests/UnitTests/ArrowResultChunkTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using NUnit.Framework;
using Snowflake.Data.Core;
using Snowflake.Data.Tests.Util;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

namespace Snowflake.Data.Tests.UnitTests
{
Expand Down
1 change: 1 addition & 0 deletions Snowflake.Data.Tests/UnitTests/ArrowResultSetTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using NUnit.Framework;
using Snowflake.Data.Core;
using Snowflake.Data.Tests.Util;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

namespace Snowflake.Data.Tests.UnitTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace Snowflake.Data.Tests.UnitTests
using System;
using System.Collections.Generic;
using System.Threading;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

[TestFixture, NonParallelizable]
class ChunkDownloaderFactoryTest
Expand Down
1 change: 1 addition & 0 deletions Snowflake.Data.Tests/UnitTests/ChunkParserFactoryTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace Snowflake.Data.Tests.UnitTests
using System.Security;
using System.Text;
using System.Threading;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

[TestFixture, NonParallelizable]
class ChunkParserFactoryTest
Expand Down
1 change: 1 addition & 0 deletions Snowflake.Data.Tests/UnitTests/ConcatenatedStreamTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace Snowflake.Data.Tests.UnitTests
using System;
using System.IO;
using System.Text;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

[TestFixture]
class ConcatenatedStreamTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using NUnit.Framework;
using Snowflake.Data.Configuration;
using Snowflake.Data.Core.Tools;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

namespace Snowflake.Data.Tests.UnitTests.Configuration
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using System.IO;
using NUnit.Framework;
using Snowflake.Data.Configuration;
using Assert = NUnit.Framework.Legacy.ClassicAssert;
using static Snowflake.Data.Tests.UnitTests.Configuration.EasyLoggingConfigGenerator;

namespace Snowflake.Data.Tests.UnitTests.Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Moq;
using NUnit.Framework;
using Snowflake.Data.Configuration;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

namespace Snowflake.Data.Tests.UnitTests.Configuration
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System;
using NUnit.Framework;
using Snowflake.Data.Configuration;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

namespace Snowflake.Data.Tests.UnitTests.Configuration
{
Expand Down
1 change: 1 addition & 0 deletions Snowflake.Data.Tests/UnitTests/FastMemoryStreamTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace Snowflake.Data.Tests.UnitTests
using NUnit.Framework;
using Snowflake.Data.Core;
using System.Linq;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

[TestFixture]
class FastMemoryStreamTest
Expand Down
1 change: 1 addition & 0 deletions Snowflake.Data.Tests/UnitTests/FastParserTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace Snowflake.Data.Tests.UnitTests
using Snowflake.Data.Core;
using System;
using System.Text;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

[TestFixture]
[SetCulture("en-US")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Text;
using NUnit.Framework;
using Snowflake.Data.Core.FileTransfer;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

namespace Snowflake.Data.Tests
{
Expand Down
1 change: 1 addition & 0 deletions Snowflake.Data.Tests/UnitTests/HttpUtilTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace Snowflake.Data.Tests.UnitTests
using System.Threading.Tasks;
using System.Net;
using System;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

[TestFixture]
class HttpUtilTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
using Snowflake.Data.Configuration;
using Snowflake.Data.Core;
using Snowflake.Data.Log;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

namespace Snowflake.Data.Tests.UnitTests.Logger
{
[TestFixture, NonParallelizable]
public class EasyLoggerManagerTest
{

private const string InfoMessage = "Easy logging Info message";
private const string DebugMessage = "Easy logging Debug message";
private const string WarnMessage = "Easy logging Warn message";
Expand Down
3 changes: 2 additions & 1 deletion Snowflake.Data.Tests/UnitTests/Logger/SFLoggerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ namespace Snowflake.Data.Tests.UnitTests
{
using NUnit.Framework;
using Snowflake.Data.Log;

using Assert = NUnit.Framework.Legacy.ClassicAssert;

[TestFixture, NonParallelizable]
class SFLoggerTest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using NUnit.Framework;
using Snowflake.Data.Log;
using System.Collections.Generic;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

namespace Snowflake.Data.Tests.UnitTests.Logger
{
Expand Down
1 change: 1 addition & 0 deletions Snowflake.Data.Tests/UnitTests/QueryContextCacheTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace Snowflake.Data.Tests.UnitTests
using Snowflake.Data.Core;
using System;
using System.Collections.Generic;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

[TestFixture]
class QueryContextCacheTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace Snowflake.Data.Tests.UnitTests
using Snowflake.Data.Client;
using Snowflake.Data.Core;
using Snowflake.Data.Core.Authenticator;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

[TestFixture]
class SFAuthenticatorFactoryTest
Expand Down
1 change: 1 addition & 0 deletions Snowflake.Data.Tests/UnitTests/SFAzureClientTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ namespace Snowflake.Data.Tests.UnitTests
using Moq;
using Azure;
using Azure.Storage.Blobs.Models;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

[TestFixture]
class SFAzureClientTest : SFBaseTest
Expand Down
1 change: 1 addition & 0 deletions Snowflake.Data.Tests/UnitTests/SFBindUploaderTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System;
using NUnit.Framework;
using Snowflake.Data.Core;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

namespace Snowflake.Data.Tests.UnitTests
{
Expand Down
1 change: 1 addition & 0 deletions Snowflake.Data.Tests/UnitTests/SFDataConverterTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace Snowflake.Data.Tests.UnitTests
using NUnit.Framework;
using System.Threading;
using System.Globalization;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

[TestFixture]
[SetCulture("en-US")]
Expand Down
1 change: 1 addition & 0 deletions Snowflake.Data.Tests/UnitTests/SFDbCommandBuilderTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace Snowflake.Data.Tests.UnitTests
{
using NUnit.Framework;
using Snowflake.Data.Client;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

[TestFixture]
class SFDbCommandBuilderTest
Expand Down
1 change: 1 addition & 0 deletions Snowflake.Data.Tests/UnitTests/SFDbCommandTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace Snowflake.Data.Tests.UnitTests
using System;
using System.Threading;
using System.Threading.Tasks;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

[TestFixture]
class SFDbCommandTest
Expand Down
Loading

0 comments on commit 0e7a4ad

Please sign in to comment.