Skip to content

Commit 03ae6bf

Browse files
Bump dependencies (#1682)
* Bump the dependencies group with 4 updates Bumps BouncyCastle.Cryptography from 2.6.1 to 2.6.2 Bumps Meziantou.Analyzer from 2.0.205 to 2.0.210 Bumps MSTest from 3.9.3 to 3.10.0 Bumps SonarAnalyzer.CSharp from 10.13.0.120203 to 10.15.0.120848 Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Rob Hague <[email protected]>
1 parent 605ee7f commit 03ae6bf

File tree

46 files changed

+199
-199
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+199
-199
lines changed

Directory.Packages.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55
</PropertyGroup>
66
<ItemGroup>
77
<PackageVersion Include="BenchmarkDotNet" Version="0.15.2" />
8-
<PackageVersion Include="BouncyCastle.Cryptography" Version="2.6.1" />
8+
<PackageVersion Include="BouncyCastle.Cryptography" Version="2.6.2" />
99
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
1010
<PackageVersion Include="coverlet.msbuild" Version="6.0.4" />
1111
<PackageVersion Include="GitHubActionsTestLogger" Version="2.4.1" />
12-
<PackageVersion Include="Meziantou.Analyzer" Version="2.0.205" />
12+
<PackageVersion Include="Meziantou.Analyzer" Version="2.0.210" />
1313
<!-- Should stay on LTS .NET releases. -->
1414
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.3" />
1515
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="9.0.7" />
16-
<PackageVersion Include="MSTest" Version="3.9.3" />
16+
<PackageVersion Include="MSTest" Version="3.10.0" />
1717
<PackageVersion Include="Moq" Version="4.20.72" />
1818
<PackageVersion Include="Nerdbank.GitVersioning" Version="3.7.115" />
1919
<PackageVersion Include="PolySharp" Version="1.15.0" />
20-
<PackageVersion Include="SonarAnalyzer.CSharp" Version="10.13.0.120203" />
20+
<PackageVersion Include="SonarAnalyzer.CSharp" Version="10.15.0.120848" />
2121
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
2222
<!-- Should stay on LTS .NET releases. -->
2323
<PackageVersion Include="System.Formats.Asn1" Version="8.0.2" />

test/Renci.SshNet.IntegrationTests/OldIntegrationTests/ForwardedPortLocalTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public void Test_PortForwarding_Local_Without_Connecting()
105105
using (var client = new SshClient(SshServerHostName, SshServerPort, User.UserName, User.Password))
106106
{
107107
using var port1 = new ForwardedPortLocal("localhost", 8084, "www.renci.org", 80);
108-
Assert.ThrowsException<SshConnectionException>(() => client.AddForwardedPort(port1));
108+
Assert.ThrowsExactly<SshConnectionException>(() => client.AddForwardedPort(port1));
109109
}
110110
}
111111
}

test/Renci.SshNet.IntegrationTests/OldIntegrationTests/SftpClientTest.ChangeDirectory.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public void Test_Sftp_ChangeDirectory_Root_Dont_Exists()
1414
using (var sftp = new SftpClient(SshServerHostName, SshServerPort, User.UserName, User.Password))
1515
{
1616
sftp.Connect();
17-
Assert.ThrowsException<SftpPathNotFoundException>(() => sftp.ChangeDirectory("/asdasd"));
17+
Assert.ThrowsExactly<SftpPathNotFoundException>(() => sftp.ChangeDirectory("/asdasd"));
1818
}
1919
}
2020

@@ -26,7 +26,7 @@ public async Task Test_Sftp_ChangeDirectory_Root_Dont_ExistsAsync()
2626
{
2727
await sftp.ConnectAsync(CancellationToken.None).ConfigureAwait(false);
2828

29-
await Assert.ThrowsExceptionAsync<SftpPathNotFoundException>(
29+
await Assert.ThrowsExactlyAsync<SftpPathNotFoundException>(
3030
() => sftp.ChangeDirectoryAsync("/asdasd", CancellationToken.None));
3131
}
3232
}
@@ -38,7 +38,7 @@ public void Test_Sftp_ChangeDirectory_Root_With_Slash_Dont_Exists()
3838
using (var sftp = new SftpClient(SshServerHostName, SshServerPort, User.UserName, User.Password))
3939
{
4040
sftp.Connect();
41-
Assert.ThrowsException<SftpPathNotFoundException>(() => sftp.ChangeDirectory("/asdasd/"));
41+
Assert.ThrowsExactly<SftpPathNotFoundException>(() => sftp.ChangeDirectory("/asdasd/"));
4242
}
4343
}
4444

@@ -50,7 +50,7 @@ public async Task Test_Sftp_ChangeDirectory_Root_With_Slash_Dont_ExistsAsync()
5050
{
5151
await sftp.ConnectAsync(CancellationToken.None).ConfigureAwait(false);
5252

53-
await Assert.ThrowsExceptionAsync<SftpPathNotFoundException>(
53+
await Assert.ThrowsExactlyAsync<SftpPathNotFoundException>(
5454
() => sftp.ChangeDirectoryAsync("/asdasd/", CancellationToken.None));
5555
}
5656
}
@@ -62,7 +62,7 @@ public void Test_Sftp_ChangeDirectory_Subfolder_Dont_Exists()
6262
using (var sftp = new SftpClient(SshServerHostName, SshServerPort, User.UserName, User.Password))
6363
{
6464
sftp.Connect();
65-
Assert.ThrowsException<SftpPathNotFoundException>(() => sftp.ChangeDirectory("/asdasd/sssddds"));
65+
Assert.ThrowsExactly<SftpPathNotFoundException>(() => sftp.ChangeDirectory("/asdasd/sssddds"));
6666
}
6767
}
6868

@@ -74,7 +74,7 @@ public async Task Test_Sftp_ChangeDirectory_Subfolder_Dont_ExistsAsync()
7474
{
7575
await sftp.ConnectAsync(CancellationToken.None).ConfigureAwait(false);
7676

77-
await Assert.ThrowsExceptionAsync<SftpPathNotFoundException>(
77+
await Assert.ThrowsExactlyAsync<SftpPathNotFoundException>(
7878
() => sftp.ChangeDirectoryAsync("/asdasd/sssddds", CancellationToken.None));
7979
}
8080
}
@@ -86,7 +86,7 @@ public void Test_Sftp_ChangeDirectory_Subfolder_With_Slash_Dont_Exists()
8686
using (var sftp = new SftpClient(SshServerHostName, SshServerPort, User.UserName, User.Password))
8787
{
8888
sftp.Connect();
89-
Assert.ThrowsException<SftpPathNotFoundException>(() => sftp.ChangeDirectory("/asdasd/sssddds/"));
89+
Assert.ThrowsExactly<SftpPathNotFoundException>(() => sftp.ChangeDirectory("/asdasd/sssddds/"));
9090
}
9191
}
9292

@@ -98,7 +98,7 @@ public async Task Test_Sftp_ChangeDirectory_Subfolder_With_Slash_Dont_ExistsAsyn
9898
{
9999
await sftp.ConnectAsync(CancellationToken.None).ConfigureAwait(false);
100100

101-
await Assert.ThrowsExceptionAsync<SftpPathNotFoundException>(
101+
await Assert.ThrowsExactlyAsync<SftpPathNotFoundException>(
102102
() => sftp.ChangeDirectoryAsync("/asdasd/sssddds/", CancellationToken.None));
103103
}
104104
}

test/Renci.SshNet.IntegrationTests/OldIntegrationTests/SftpClientTest.CreateDirectory.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public void Test_Sftp_CreateDirectory_In_Forbidden_Directory()
3030
{
3131
sftp.Connect();
3232

33-
Assert.ThrowsException<SftpPermissionDeniedException>(() => sftp.CreateDirectory("/sbin/test"));
33+
Assert.ThrowsExactly<SftpPermissionDeniedException>(() => sftp.CreateDirectory("/sbin/test"));
3434
}
3535
}
3636

@@ -42,7 +42,7 @@ public void Test_Sftp_CreateDirectory_Invalid_Path()
4242
{
4343
sftp.Connect();
4444

45-
Assert.ThrowsException<SftpPathNotFoundException>(() => sftp.CreateDirectory("/abcdefg/abcefg"));
45+
Assert.ThrowsExactly<SftpPathNotFoundException>(() => sftp.CreateDirectory("/abcdefg/abcefg"));
4646
}
4747
}
4848

@@ -56,7 +56,7 @@ public void Test_Sftp_CreateDirectory_Already_Exists()
5656

5757
sftp.CreateDirectory("test");
5858

59-
Assert.ThrowsException<SshException>(() => sftp.CreateDirectory("test"));
59+
Assert.ThrowsExactly<SshException>(() => sftp.CreateDirectory("test"));
6060
}
6161
}
6262
}

test/Renci.SshNet.IntegrationTests/OldIntegrationTests/SftpClientTest.DeleteDirectory.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public void Test_Sftp_DeleteDirectory_Which_Doesnt_Exists()
1515
{
1616
sftp.Connect();
1717

18-
Assert.ThrowsException<SftpPathNotFoundException>(() => sftp.DeleteDirectory("abcdef"));
18+
Assert.ThrowsExactly<SftpPathNotFoundException>(() => sftp.DeleteDirectory("abcdef"));
1919
}
2020
}
2121

@@ -27,7 +27,7 @@ public void Test_Sftp_DeleteDirectory_Which_No_Permissions()
2727
{
2828
sftp.Connect();
2929

30-
Assert.ThrowsException<SftpPermissionDeniedException>(() => sftp.DeleteDirectory("/usr"));
30+
Assert.ThrowsExactly<SftpPermissionDeniedException>(() => sftp.DeleteDirectory("/usr"));
3131
}
3232
}
3333

@@ -55,7 +55,7 @@ public void Test_Sftp_DeleteDirectory_Null()
5555
{
5656
sftp.Connect();
5757

58-
Assert.ThrowsException<ArgumentNullException>(() => sftp.DeleteDirectory(null));
58+
Assert.ThrowsExactly<ArgumentNullException>(() => sftp.DeleteDirectory(null));
5959
}
6060
}
6161
}

test/Renci.SshNet.IntegrationTests/OldIntegrationTests/SftpClientTest.Download.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public void Test_Sftp_Download_Forbidden()
1515
{
1616
sftp.Connect();
1717

18-
Assert.ThrowsException<SftpPermissionDeniedException>(() => sftp.DownloadFile("/root/.profile", Stream.Null));
18+
Assert.ThrowsExactly<SftpPermissionDeniedException>(() => sftp.DownloadFile("/root/.profile", Stream.Null));
1919
}
2020
}
2121

@@ -27,7 +27,7 @@ public void Test_Sftp_Download_File_Not_Exists()
2727
{
2828
sftp.Connect();
2929

30-
Assert.ThrowsException<SftpPathNotFoundException>(() => sftp.DownloadFile("/xxx/eee/yyy", Stream.Null));
30+
Assert.ThrowsExactly<SftpPathNotFoundException>(() => sftp.DownloadFile("/xxx/eee/yyy", Stream.Null));
3131
}
3232
}
3333

@@ -39,7 +39,7 @@ public async Task Test_Sftp_DownloadAsync_Forbidden()
3939
{
4040
await sftp.ConnectAsync(CancellationToken.None).ConfigureAwait(false);
4141

42-
await Assert.ThrowsExceptionAsync<SftpPermissionDeniedException>(() => sftp.DownloadFileAsync("/root/.profile", Stream.Null));
42+
await Assert.ThrowsExactlyAsync<SftpPermissionDeniedException>(() => sftp.DownloadFileAsync("/root/.profile", Stream.Null));
4343
}
4444
}
4545

@@ -51,7 +51,7 @@ public async Task Test_Sftp_DownloadAsync_File_Not_Exists()
5151
{
5252
await sftp.ConnectAsync(CancellationToken.None).ConfigureAwait(false);
5353

54-
await Assert.ThrowsExceptionAsync<SftpPathNotFoundException>(() => sftp.DownloadFileAsync("/xxx/eee/yyy", Stream.Null));
54+
await Assert.ThrowsExactlyAsync<SftpPathNotFoundException>(() => sftp.DownloadFileAsync("/xxx/eee/yyy", Stream.Null));
5555
}
5656
}
5757

@@ -65,7 +65,7 @@ public async Task Test_Sftp_DownloadAsync_Cancellation_Requested()
6565

6666
var cancelledToken = new CancellationToken(true);
6767

68-
await Assert.ThrowsExceptionAsync<OperationCanceledException>(() => sftp.DownloadFileAsync("/xxx/eee/yyy", Stream.Null, cancelledToken));
68+
await Assert.ThrowsExactlyAsync<OperationCanceledException>(() => sftp.DownloadFileAsync("/xxx/eee/yyy", Stream.Null, cancelledToken));
6969
}
7070
}
7171

@@ -78,7 +78,7 @@ public void Test_Sftp_BeginDownloadFile_StreamIsNull()
7878
{
7979
sftp.Connect();
8080

81-
Assert.ThrowsException<ArgumentNullException>(() => sftp.BeginDownloadFile("aaaa", null, null, null));
81+
Assert.ThrowsExactly<ArgumentNullException>(() => sftp.BeginDownloadFile("aaaa", null, null, null));
8282
}
8383
}
8484

@@ -91,7 +91,7 @@ public void Test_Sftp_BeginDownloadFile_FileNameIsWhiteSpace()
9191
{
9292
sftp.Connect();
9393

94-
Assert.ThrowsException<ArgumentException>(() => sftp.BeginDownloadFile(" ", Stream.Null, null, null));
94+
Assert.ThrowsExactly<ArgumentException>(() => sftp.BeginDownloadFile(" ", Stream.Null, null, null));
9595
}
9696
}
9797

@@ -104,7 +104,7 @@ public void Test_Sftp_BeginDownloadFile_FileNameIsNull()
104104
{
105105
sftp.Connect();
106106

107-
Assert.ThrowsException<ArgumentNullException>(() => sftp.BeginDownloadFile(null, Stream.Null, null, null));
107+
Assert.ThrowsExactly<ArgumentNullException>(() => sftp.BeginDownloadFile(null, Stream.Null, null, null));
108108
}
109109
}
110110

@@ -121,7 +121,7 @@ public void Test_Sftp_EndDownloadFile_Invalid_Async_Handle()
121121
var async1 = sftp.BeginListDirectory("/", null, null);
122122
var async2 = sftp.BeginDownloadFile("test123", new MemoryStream(), null, null);
123123

124-
Assert.ThrowsException<ArgumentException>(() => sftp.EndDownloadFile(async1));
124+
Assert.ThrowsExactly<ArgumentException>(() => sftp.EndDownloadFile(async1));
125125
}
126126
}
127127
}

test/Renci.SshNet.IntegrationTests/OldIntegrationTests/SftpClientTest.GetAttributes.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public void Test_Sftp_GetAttributes_Not_Exists()
1212
{
1313
sftp.Connect();
1414

15-
Assert.ThrowsException<SftpPathNotFoundException>(() => sftp.GetAttributes("/asdfgh"));
15+
Assert.ThrowsExactly<SftpPathNotFoundException>(() => sftp.GetAttributes("/asdfgh"));
1616
}
1717
}
1818

@@ -24,7 +24,7 @@ public void Test_Sftp_GetAttributes_Null()
2424
{
2525
sftp.Connect();
2626

27-
Assert.ThrowsException<ArgumentNullException>(() => sftp.GetAttributes(null));
27+
Assert.ThrowsExactly<ArgumentNullException>(() => sftp.GetAttributes(null));
2828
}
2929
}
3030

test/Renci.SshNet.IntegrationTests/OldIntegrationTests/SftpClientTest.GetAttributesAsync.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public async Task Test_Sftp_GetAttributesAsync_Not_Exists()
1818

1919
await sftp.ConnectAsync(cts.Token);
2020

21-
await Assert.ThrowsExceptionAsync<SftpPathNotFoundException>(async () => await sftp.GetAttributesAsync("/asdfgh", cts.Token));
21+
await Assert.ThrowsExactlyAsync<SftpPathNotFoundException>(async () => await sftp.GetAttributesAsync("/asdfgh", cts.Token));
2222
}
2323
}
2424

@@ -33,7 +33,7 @@ public async Task Test_Sftp_GetAttributesAsync_Null()
3333

3434
await sftp.ConnectAsync(cts.Token);
3535

36-
await Assert.ThrowsExceptionAsync<ArgumentNullException>(async () => await sftp.GetAttributesAsync(null, cts.Token));
36+
await Assert.ThrowsExactlyAsync<ArgumentNullException>(async () => await sftp.GetAttributesAsync(null, cts.Token));
3737
}
3838
}
3939

test/Renci.SshNet.IntegrationTests/OldIntegrationTests/SftpClientTest.ListDirectory.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public void Test_Sftp_ListDirectory_Permission_Denied()
1717
{
1818
sftp.Connect();
1919

20-
Assert.ThrowsException<SftpPermissionDeniedException>(() => sftp.ListDirectory("/root"));
20+
Assert.ThrowsExactly<SftpPermissionDeniedException>(() => sftp.ListDirectory("/root"));
2121
}
2222
}
2323

@@ -29,7 +29,7 @@ public void Test_Sftp_ListDirectory_Not_Exists()
2929
{
3030
sftp.Connect();
3131

32-
Assert.ThrowsException<SftpPathNotFoundException>(() => sftp.ListDirectory("/asdfgh"));
32+
Assert.ThrowsExactly<SftpPathNotFoundException>(() => sftp.ListDirectory("/asdfgh"));
3333
}
3434
}
3535

@@ -107,7 +107,7 @@ public void Test_Sftp_ListDirectory_Null()
107107
{
108108
sftp.Connect();
109109

110-
Assert.ThrowsException<ArgumentNullException>(() => sftp.ListDirectory(null));
110+
Assert.ThrowsExactly<ArgumentNullException>(() => sftp.ListDirectory(null));
111111
}
112112
}
113113

@@ -283,7 +283,7 @@ public void Test_Sftp_ChangeDirectory_Null()
283283
{
284284
sftp.Connect();
285285

286-
Assert.ThrowsException<ArgumentNullException>(() => sftp.ChangeDirectory(null));
286+
Assert.ThrowsExactly<ArgumentNullException>(() => sftp.ChangeDirectory(null));
287287
}
288288
}
289289

@@ -296,7 +296,7 @@ public async Task Test_Sftp_ChangeDirectory_NullAsync()
296296
{
297297
await sftp.ConnectAsync(CancellationToken.None).ConfigureAwait(false);
298298

299-
await Assert.ThrowsExceptionAsync<ArgumentNullException>(() => sftp.ChangeDirectoryAsync(null));
299+
await Assert.ThrowsExactlyAsync<ArgumentNullException>(() => sftp.ChangeDirectoryAsync(null));
300300
}
301301
}
302302

@@ -312,7 +312,7 @@ public void Test_Sftp_Call_EndListDirectory_Twice()
312312
var result = sftp.EndListDirectory(ar);
313313

314314
// TODO there is no reason that this should throw
315-
Assert.ThrowsException<ArgumentException>(() => sftp.EndListDirectory(ar));
315+
Assert.ThrowsExactly<ArgumentException>(() => sftp.EndListDirectory(ar));
316316
}
317317
}
318318
}

test/Renci.SshNet.IntegrationTests/OldIntegrationTests/SftpClientTest.RenameFile.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public void Test_Sftp_RenameFile_Null()
4343
{
4444
sftp.Connect();
4545

46-
Assert.ThrowsException<ArgumentNullException>(() => sftp.RenameFile(null, null));
46+
Assert.ThrowsExactly<ArgumentNullException>(() => sftp.RenameFile(null, null));
4747
}
4848
}
4949
}

0 commit comments

Comments
 (0)