public void It_should_visualize_status_category(string statusCategory, string expected) { var card = new EpicCard(new EpicMetadata(new Epic { StatusCategory = statusCategory }, new IndexedDay(), new IndexedDay()), 1); _visualizer.GetStatusIcons(card).ShouldContain(expected); }
public IEnumerable <string> GetStatusIcons(EpicCard card) { var status = new List <string>(); var epicStatus = card.Meta.Epic.StatusCategory; if (string.Equals(epicStatus, "done", StringComparison.OrdinalIgnoreCase)) { status.Add("✔️"); } else if (string.Equals(epicStatus, "in progress", StringComparison.OrdinalIgnoreCase)) { status.Add("⚙️"); } else { status.Add("❔"); } return(status); }
public string GetColor(EpicCard block) => _codes.GetOrAdd(block.Meta.Epic.Project ?? string.Empty, GenerateColor);