Skip to content

Commit 9f77957

Browse files
author
Darran
committed
Fix broken tests and update package version
1 parent 5cd73ec commit 9f77957

6 files changed

Lines changed: 14 additions & 12 deletions

File tree

DalSoft.RestClient.Test.Integration/DynamicRestClientTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public async Task Get_NonJsonContentFromGoogle_GetsContentCorrectly()
157157
var content = result.ToString();
158158

159159
Assert.That(result.HttpResponseMessage.StatusCode, Is.EqualTo(HttpStatusCode.OK));
160-
Assert.That(content, Does.Contain("News"));
160+
Assert.That(content, Does.Contain("Terms of Service"));
161161
}
162162

163163
[Test]
@@ -360,4 +360,4 @@ public async Task DynamicRestClient_SetCookiesUsingCookieHandler_CorrectlySetsCo
360360
Assert.AreEqual("darran", response.GetCookieContainer()?.GetCookies(new Uri("https://httpbin.org"))["testcookie"]?.Value);
361361
}
362362
}
363-
}
363+
}

DalSoft.RestClient.Test.Integration/HandlersTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@ public async Task Post_DataUsingFormUrlEncodedContentType_CorrectlyPostsData()
133133
Assert.That(response.form.comments, Is.EqualTo(formUrlEncodedData.comments));
134134
}
135135

136-
[Test]
136+
[Test, Ignore("Need to find a new site to test this, or better still create a integration test controller")]
137137
public async Task Post_MultipartForm_CorrectlyPostsFile()
138138
{
139-
dynamic restClient = new RestClient("https://www.directupload.net/index.php", new Config
139+
dynamic restClient = new RestClient("https://www.directupload.eu/index.php", new Config
140140
(
141141
new MultipartFormDataHandler()
142142
));

DalSoft.RestClient.Test.Integration/RestClientFactoryTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public async Task CreateClient_MoreThanOneRegisteredClient_InvokesCorrectRestCli
4949
var result = await restClient2.Headers(new Headers { { "Accept", "text/html" } } ).news.Get();
5050
var content = result.ToString();
5151

52-
Assert.That(content, Does.Contain("News"));
52+
Assert.That(content, Does.Contain("Terms of Service"));
5353
}
5454

5555
[Test]

DalSoft.RestClient.Test.Integration/RestClientTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public async Task Get_NonJsonContentFromGoogle_GetsContentCorrectly()
161161
var content = result.ToString();
162162

163163
Assert.That(result.HttpResponseMessage.StatusCode, Is.EqualTo(HttpStatusCode.OK));
164-
Assert.That(content, Does.Contain("News"));
164+
Assert.That(content, Does.Contain("Terms of Service"));
165165
}
166166

167167
[Test]
@@ -448,7 +448,7 @@ public async Task Post_DataUsingFormUrlEncodedContentType_CorrectlyPostsData()
448448
Assert.That(response.form.comments, Is.EqualTo(formUrlEncodedData.comments));
449449
}
450450

451-
[Test]
451+
[Test, Ignore("Need to find a new site to test this, or better still create a integration test controller")]
452452
public async Task Post_MultipartForm_CorrectlyPostsFile()
453453
{
454454
dynamic restClient = new RestClient("http://en.directupload.net/index.php", new Config
@@ -576,7 +576,7 @@ public async Task Post_ImageThenStatusUpdateUsingTwitterHandler_CorrectlyPostsIm
576576
Assert.AreEqual(HttpStatusCode.OK, statusUpdateResult.HttpResponseMessage.StatusCode);
577577
}
578578

579-
[TestCase("www.instagram.com")] // A Grade
579+
[TestCase("www.instagram.com"), Ignore("Requires API key")] // A Grade
580580
public async Task Websites_SecurityHeaders_ShouldBeAGradeOrAbove(string url)
581581
{
582582
var restClient = new RestClient("https://securityheaders.com/");

DalSoft.RestClient/DalSoft.RestClient.csproj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
Everything you need to know: https://restclient.dalsoft.io/
1717
</Description>
18-
<VersionPrefix>4.4.1</VersionPrefix>
18+
<VersionPrefix>4.4.2</VersionPrefix>
1919
<!-- https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/cross-platform-targeting -->
2020
<TargetFrameworks>netstandard2.0</TargetFrameworks>
2121
<AssemblyName>DalSoft.RestClient</AssemblyName>
@@ -26,7 +26,9 @@
2626
<Owners>DalSoft</Owners>
2727
<Authors>DalSoft, joakimjm</Authors>
2828
<PackageReleaseNotes>
29-
Refined Act(..), As(...), Map(...), Verfiy(...) and OnException(...), tested in .net6.0
29+
Bumps [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json) from 12.0.2 to 13.0.1.
30+
- [Release notes](https://github.com/JamesNK/Newtonsoft.Json/releases)
31+
- [Commits](https://github.com/JamesNK/Newtonsoft.Json/compare/12.0.2...13.0.1)
3032
</PackageReleaseNotes>
3133
<PackageIcon>icon.png</PackageIcon>
3234
<PackageLicenseFile>LICENSE</PackageLicenseFile>
@@ -45,5 +47,6 @@
4547
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.2.0" />
4648
<None Include="Assets\icon.png" Pack="true" PackagePath="\"/>
4749
<None Include="Assets\LICENSE" Pack="true" PackagePath="\"/>
50+
<None Include="..\README.md" Pack="true" PackagePath="\"/>
4851
</ItemGroup>
4952
</Project>

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# DalSoft .NET REST Client for all platforms
22

3-
### `If you find this repo / package useful all I ask is you please star it.`
3+
### `If you find this repo / template useful all I ask is you please star it`
44

55
![Nuget](https://img.shields.io/nuget/v/DalSoft.RestClient)
6-
[![Help and chat on Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/DalSoft-RestClient)
76
[![StackOverflow](https://img.shields.io/badge/questions-on%20StackOverflow-orange.svg?style=flat)](http://stackoverflow.com/questions/tagged/dalsoft.restclient)
87
[![Docs](https://img.shields.io/badge/Docs-Website-yellow)](https://restclient.dalsoft.io/)
98

0 commit comments

Comments
 (0)