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

net-daemon / netdaemon / 5780341566

pending completion
5780341566

push

github

web-flow
Bump Microsoft.NET.Test.Sdk from 17.6.3 to 17.7.0 (#900)

Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.6.3 to 17.7.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md)
- [Commits](https://github.com/microsoft/vstest/compare/v17.6.3...v17.7.0)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

791 of 1112 branches covered (71.13%)

Branch coverage included in aggregate %.

3707 of 4342 relevant lines covered (85.38%)

48.34 hits per line

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

60.0
/src/Client/NetDaemon.HassClient/Internal/Net/WebSocketClientImpl.cs
1
namespace NetDaemon.Client.Internal.Net;
2

3
/// <summary>
4
///     This class wraps the ClientWebSocket so we can do
5
///     mockable communications
6
/// </summary>
7
internal class WebSocketClientImpl : IWebSocketClient
8
{
9
    private readonly ClientWebSocket _ws;
10

11
    /// <summary>
12
    ///     Constructor
13
    /// </summary>
14
    /// <param name="bypassCertificateErrors">
15
    ///     Provide the hash string for certificate that the websocket should ignore
16
    ///     errors from
17
    /// </param>
18
    public WebSocketClientImpl(bool bypassCertificateErrors = false)
22✔
19
    {
22✔
20
        _ws = new ClientWebSocket();
22✔
21

22
        if (bypassCertificateErrors)
22!
23
            _ws.Options.RemoteCertificateValidationCallback = (_, cert, _, sslPolicyErrors) =>
×
24
            {
×
25
                return sslPolicyErrors == SslPolicyErrors.None || true;
×
26
            };
×
27
    }
22✔
28

29
    public WebSocketState State => _ws.State;
354✔
30

31
    public WebSocketCloseStatus? CloseStatus => _ws.CloseStatus;
155✔
32

33
    public Task ConnectAsync(Uri uri, CancellationToken cancel)
34
    {
21✔
35
        return _ws.ConnectAsync(uri, cancel);
21✔
36
    }
21✔
37

38
    public Task CloseAsync(WebSocketCloseStatus closeStatus, string statusDescription,
39
        CancellationToken cancellationToken)
40
    {
20✔
41
        return _ws.CloseAsync(closeStatus, statusDescription, cancellationToken);
20✔
42
    }
20✔
43

44
    public Task CloseOutputAsync(WebSocketCloseStatus closeStatus, string statusDescription,
45
        CancellationToken cancellationToken)
46
    {
×
47
        return _ws.CloseAsync(closeStatus, statusDescription, cancellationToken);
×
48
    }
×
49

50
    public Task SendAsync(ArraySegment<byte> buffer, WebSocketMessageType messageType, bool endOfMessage,
51
        CancellationToken cancellationToken)
52
    {
57✔
53
        return _ws.SendAsync(buffer, messageType, endOfMessage, cancellationToken);
57✔
54
    }
57✔
55

56
    public async ValueTask SendAsync(ReadOnlyMemory<byte> buffer, WebSocketMessageType messageType,
57
        bool endOfMessage, CancellationToken cancellationToken)
58
    {
×
59
        await Task.FromException(new NotImplementedException()).ConfigureAwait(false);
×
60
    }
×
61

62
    public Task<WebSocketReceiveResult> ReceiveAsync(ArraySegment<byte> buffer,
63
        CancellationToken cancellationToken)
64
    {
×
65
        return Task.FromException<WebSocketReceiveResult>(new NotImplementedException());
×
66
    }
×
67

68
    public ValueTask<ValueWebSocketReceiveResult> ReceiveAsync(Memory<byte> buffer,
69
        CancellationToken cancellationToken)
70
    {
96✔
71
        return _ws.ReceiveAsync(buffer, cancellationToken);
96✔
72
    }
96✔
73

74
    public ValueTask DisposeAsync()
75
    {
19✔
76
        _ws.Dispose();
19✔
77
        return ValueTask.CompletedTask;
19✔
78
    }
19✔
79
}
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