File tree Expand file tree Collapse file tree
FileSystem.Adapters.AmazonS3 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff 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 ) ;
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments