From 13e3e5f2f50701af5e296ef5b7ae1ad4d01746ee Mon Sep 17 00:00:00 2001 From: Michiel Post Date: Fri, 11 Oct 2024 14:02:10 +0200 Subject: [PATCH] dependencies updated --- .../HueApi.ConsoleSample.csproj | 2 +- src/HueApi.Tests/HueApi.Tests.csproj | 8 +++---- src/HueApi.Tests/LightTests.cs | 23 ++++++++++++++++++- src/HueDiagnostics/HueDiagnostics.csproj | 4 ++-- 4 files changed, 29 insertions(+), 8 deletions(-) diff --git a/src/HueApi.ConsoleSample/HueApi.ConsoleSample.csproj b/src/HueApi.ConsoleSample/HueApi.ConsoleSample.csproj index 1d5414f..958f408 100644 --- a/src/HueApi.ConsoleSample/HueApi.ConsoleSample.csproj +++ b/src/HueApi.ConsoleSample/HueApi.ConsoleSample.csproj @@ -11,7 +11,7 @@ - + diff --git a/src/HueApi.Tests/HueApi.Tests.csproj b/src/HueApi.Tests/HueApi.Tests.csproj index 50064fd..179dd2f 100644 --- a/src/HueApi.Tests/HueApi.Tests.csproj +++ b/src/HueApi.Tests/HueApi.Tests.csproj @@ -9,10 +9,10 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/HueApi.Tests/LightTests.cs b/src/HueApi.Tests/LightTests.cs index 9634fe0..3fabe38 100644 --- a/src/HueApi.Tests/LightTests.cs +++ b/src/HueApi.Tests/LightTests.cs @@ -1,4 +1,3 @@ -using HueApi.BridgeLocator; using HueApi.ColorConverters.Original.Extensions; using HueApi.Models; using HueApi.Models.Requests; @@ -108,6 +107,28 @@ public async Task ChangeLightColor() } + [TestMethod] + public async Task TestChangeLightColor() + { + var all = await localHueClient.GetLightsAsync(); + var id = all.Data.First().Id; + var rgbColorHue = new HueApi.ColorConverters.RGBColor(10, 10, 10); + + // Create the light update command + var req = new UpdateLight() + .TurnOn() + .SetColor(rgbColorHue); + + var result = localHueClient.UpdateLightAsync(id, req).Result; + + Assert.IsNotNull(result); + Assert.IsFalse(result.HasErrors); + + Assert.IsTrue(result.Data.Count == 1); + Assert.AreEqual(id, result.Data.First().Rid); + + } + [TestMethod] public async Task ChangeGradientLightColor() { diff --git a/src/HueDiagnostics/HueDiagnostics.csproj b/src/HueDiagnostics/HueDiagnostics.csproj index e787e6c..9710166 100644 --- a/src/HueDiagnostics/HueDiagnostics.csproj +++ b/src/HueDiagnostics/HueDiagnostics.csproj @@ -10,8 +10,8 @@ - - + +