Skip to content

Commit b2ea8c9

Browse files
committed
Added interface for WLedClient to make it mockable
1 parent 9952575 commit b2ea8c9

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

src/Kevsoft.WLED/IWLedClient.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
namespace Kevsoft.WLED;
2+
3+
public interface IWLedClient
4+
{
5+
Task<WLedRootResponse> Get();
6+
7+
Task<StateResponse> GetState();
8+
9+
Task<InformationResponse> GetInformation();
10+
11+
Task<string[]> GetEffects();
12+
13+
Task<string[]> GetPalettes();
14+
15+
Task Post(WLedRootRequest request);
16+
17+
Task Post(StateRequest request);
18+
}

src/Kevsoft.WLED/WLedClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace Kevsoft.WLED;
22

3-
public sealed class WLedClient
3+
public sealed class WLedClient : IWLedClient
44
{
55
private readonly HttpClient _client;
66

0 commit comments

Comments
 (0)