Skip to content

Commit

Permalink
Fix the download test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyzimarev committed Apr 3, 2024
1 parent 3e09a51 commit f7f689e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/RestSharp.Tests.Integrated/DownloadFileTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public async Task AdvancedResponseWriter_without_ResponseWriter_reads_stream() {

[Fact]
public async Task Handles_File_Download_Failure() {
var request = new RestRequest("");
var request = new RestRequest("some/other/path");
var task = () => _client.DownloadDataAsync(request);
await task.Should().ThrowAsync<HttpRequestException>().WithMessage("Request failed with status code NotFound");
}
Expand All @@ -52,7 +52,7 @@ public async Task Handles_File_Download_Failure() {
public async Task Handles_Binary_File_Download() {
var request = new RestRequest("");
var response = await _client.DownloadDataAsync(request);
var expected = await File.ReadAllBytesAsync(Path.Combine(_path, "Assets", "Koala.jpg"));
var expected = await File.ReadAllBytesAsync(Path.Combine(_path, Path.Combine(LocalPath.Split('/'))));

Assert.Equal(expected, response);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Nullable>enable</Nullable>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="$(RepoRoot)\src\RestSharp.Serializers.Xml\RestSharp.Serializers.Xml.csproj"/>
Expand Down

0 comments on commit f7f689e

Please sign in to comment.