using Elternbeirat.Web.Shared; namespace Elternbeirat.Web.Tests; /// /// Unit tests for the icon lookup behind the Icon component. Pure logic, no /// PocketBase needed. /// public class IconSetTests { [Theory] [InlineData("calendar")] [InlineData("map-pin")] [InlineData("help-circle")] // kept under its old name although Lucide renamed it public void Known_name_returns_svg_markup(string name) { var markup = IconSet.Find(name); markup.ShouldNotBeNullOrWhiteSpace(); markup.ShouldStartWith("<"); // SVG child elements, ready to inline } [Theory] [InlineData("does-not-exist")] [InlineData("Calendar")] // lookup is case-sensitive, names are code identifiers [InlineData("")] [InlineData(null)] public void Unknown_name_returns_null(string? name) => IconSet.Find(name).ShouldBeNull(); }