public void StatusColorPalette_FromIdentifier_IdentifierShouldBeMapped(StatusColorPalette.Identifier identifier) { Action act = () => StatusColorPalette.FromIdentifier(identifier); act.Should().NotThrow(because: $"every identifier for {nameof(Theme)} should be mapped to a corresponding static color that is defined"); }
public void StatusColorPalette_HasMappedEnumToColor(StatusColorPalette.Identifier identifier) { var identifierName = Enum.GetName(typeof(StatusColorPalette.Identifier), identifier); typeof(StatusColorPalette).GetField(identifierName, BindingFlags.Static | BindingFlags.Public).Should().NotBeNull(because: $"each identifier for {nameof(StatusColorPalette)} should have a corresponding static color defined."); }