• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

loresoft / FluentRest / 9388947971

05 Jun 2024 05:56PM UTC coverage: 57.76% (+0.2%) from 57.587%
9388947971

push

github

pwelter34
fix flaky tests

277 of 614 branches covered (45.11%)

Branch coverage included in aggregate %.

847 of 1332 relevant lines covered (63.59%)

73.6 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

50.0
/src/FluentRest/FluentClient.cs
1
// Ignore Spelling: Serializer
2

3
namespace FluentRest;
4

5
/// <summary>
6
/// Provides a fluent class for sending HTTP requests and receiving HTTP responses from a resource identified by a URI.
7
/// </summary>
8
public class FluentClient : IFluentClient
9
{
10
    /// <summary>
11
    /// Initializes a new instance of the <see cref="FluentClient" /> class.
12
    /// </summary>
13
    /// <param name="httpClient">The HTTP client.</param>
14
    public FluentClient(HttpClient httpClient) : this(httpClient, null)
×
15
    {
16
    }
×
17

18
    /// <summary>
19
    /// Initializes a new instance of the <see cref="FluentClient" /> class.
20
    /// </summary>
21
    /// <param name="httpClient">The HTTP client.</param>
22
    /// <param name="contentSerializer">The content serializer.</param>
23
    public FluentClient(HttpClient httpClient, IContentSerializer contentSerializer)
117✔
24
    {
25
        HttpClient = httpClient ?? throw new ArgumentNullException(nameof(httpClient));
117!
26
        ContentSerializer = contentSerializer ?? FluentRest.ContentSerializer.Current;
117!
27
    }
117✔
28

29

30
    /// <summary>
31
    /// Gets or sets the serializer used to convert to and from <see cref="HttpContent"/>.
32
    /// </summary>
33
    /// <value>
34
    /// The serializer used to convert to and from <see cref="HttpContent"/>.
35
    /// </value>
36
    public IContentSerializer ContentSerializer { get; set; }
237✔
37

38
    /// <summary>
39
    /// Gets the <see cref="HttpClient" /> used to send request.
40
    /// </summary>
41
    /// <value>
42
    /// The <see cref="HttpClient" /> used to send request.
43
    /// </value>
44
    public HttpClient HttpClient { get; }
114✔
45

46
    /// <inheritdoc/>
47
    public void Dispose()
48
    {
49
        HttpClient?.Dispose();
×
50
    }
×
51
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc