From 3a705c8427172c24f9792728ad1c2afafe2c87d5 Mon Sep 17 00:00:00 2001 From: hocine hacherouf Date: Wed, 24 May 2023 19:35:06 +0200 Subject: [PATCH] Replace deprecated Palette by PaletteLight (#2112) --- src/AzureIoTHub.Portal.Client/Constants/Theme.cs | 2 +- .../Client/Constants/ThemeTests.cs | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/AzureIoTHub.Portal.Client/Constants/Theme.cs b/src/AzureIoTHub.Portal.Client/Constants/Theme.cs index f094e512c..0e6e92630 100644 --- a/src/AzureIoTHub.Portal.Client/Constants/Theme.cs +++ b/src/AzureIoTHub.Portal.Client/Constants/Theme.cs @@ -9,7 +9,7 @@ public static class Theme { public static readonly MudTheme CurrentTheme = new() { - Palette = new Palette + Palette = new PaletteLight { Background = "#efefef" } diff --git a/src/AzureIoTHub.Portal.Tests.Unit/Client/Constants/ThemeTests.cs b/src/AzureIoTHub.Portal.Tests.Unit/Client/Constants/ThemeTests.cs index 0693e6393..b4a662578 100644 --- a/src/AzureIoTHub.Portal.Tests.Unit/Client/Constants/ThemeTests.cs +++ b/src/AzureIoTHub.Portal.Tests.Unit/Client/Constants/ThemeTests.cs @@ -4,7 +4,8 @@ namespace AzureIoTHub.Portal.Tests.Unit.Client.Constants { using AzureIoTHub.Portal.Client.Constants; - using FluentAssertions; + using FluentAssertions; + using MudBlazor; using NUnit.Framework; [TestFixture] @@ -19,7 +20,8 @@ public void PaletteBackgroundColorOfCurrentThemeShouldBeCorrect() // Act var currentTheme = Theme.CurrentTheme; - // Assert + // Assert + _ = currentTheme.Palette.GetType().Should().Be(typeof(PaletteLight)); _ = currentTheme.Palette.Background.ToString().Should().Be(expectedPaletteBackground); } }