Skip to content

Commit 60daf47

Browse files
committed
fix running of automatic unit tests
1 parent cbb9663 commit 60daf47

3 files changed

Lines changed: 13 additions & 6 deletions

File tree

Tests/Tests.csproj

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
5-
<TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks>
4+
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
65
<LangVersion>latest</LangVersion>
76
<IsPackable>false</IsPackable>
87
</PropertyGroup>
98

109
<ItemGroup>
11-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
10+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.0" />
1211
<PackageReference Include="Moq" Version="4.18.4" />
1312
<PackageReference Include="xunit" Version="2.5.0" />
13+
<PackageReference Include="xunit.runner.console" Version="2.5.0">
14+
<PrivateAssets>all</PrivateAssets>
15+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
16+
</PackageReference>
17+
<PackageReference Include="xunit.runner.msbuild" Version="2.5.0">
18+
<PrivateAssets>all</PrivateAssets>
19+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
20+
</PackageReference>
1421
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
1522
<PrivateAssets>all</PrivateAssets>
1623
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

Tests/src/FileSystem.Adapters.AmazonS3/AmazonS3AdapterTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public async Task Test_Get_File_Async()
3535
getObjectResponse.Object.ContentLength = 1;
3636
getObjectResponse.Object.LastModified = new DateTime(1970, 1, 1);
3737

38-
amazonS3Client.Setup(o => o.GetObjectAsync("bucket-1", "/root-path-1\\test.txt", default)).ReturnsAsync(getObjectResponse.Object);
38+
amazonS3Client.Setup(o => o.GetObjectAsync("bucket-1", "/root-path-1/test.txt", default)).ReturnsAsync(getObjectResponse.Object);
3939

4040
var fileModel = new FileModel
4141
{
@@ -45,7 +45,7 @@ public async Task Test_Get_File_Async()
4545
LastModifiedDateTime = new DateTime(1970, 1, 1)
4646
};
4747

48-
var result = await amazonS3Adapter.GetFileAsync("test.txt");
48+
var result = await amazonS3Adapter.GetFileAsync("prefix-1://test.txt");
4949

5050
Assert.Equal(fileModel.Name, result.Name);
5151
Assert.Equal(fileModel.Path, result.Path);

Tests/src/FileSystem.Adapters.Sftp/SftpAdapterTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public async Task Test_Get_File_Async()
3434
var sftpClient = new Mock<SftpClient>("hostName", "userName", "password");
3535
var sftpAdapter = new SftpAdapter("prefix-1", "/root-path-1", sftpClient.Object);
3636

37-
await Assert.ThrowsAsync<ConnectionException>(async () => await sftpAdapter.GetFileAsync("test.txt"));
37+
await Assert.ThrowsAsync<ConnectionException>(async () => await sftpAdapter.GetFileAsync("prefix-1://test.txt"));
3838
}
3939
}
4040
}

0 commit comments

Comments
 (0)