public void ShouldMapFormattedTimeDateFields() { var target = JiraIssueCsvMapper.GetCsvFields(_validJiraIssue); Assert.AreEqual(_validJiraIssue.InProgressDate.ToDisplayDate(), target.GetValueOrDefault("InProgressDate")); Assert.AreEqual(_validJiraIssue.DoneDate.ToDisplayDate(), target.GetValueOrDefault("DoneDate")); }
public void ShouldMapEmptyCycleTimeToBlank() { _validJiraIssue.CycleTime = null; var target = JiraIssueCsvMapper.GetCsvFields(_validJiraIssue); Assert.AreEqual(string.Empty, target.GetValueOrDefault("CycleTime")); }
public void ShouldMapTimeInStateDates() { var target = JiraIssueCsvMapper.GetCsvFields(_validJiraIssue); _validJiraIssue.TimeInStates.ForEach(state => { Assert.AreEqual(state.Date.ToDisplayDate(), target.GetValueOrDefault(state.StateName)); }); }
public void ShouldMapUnsetDateFieldsToBlank() { _validJiraIssue.InProgressDate = DateTime.MinValue; _validJiraIssue.DoneDate = DateTime.MinValue; var target = JiraIssueCsvMapper.GetCsvFields(_validJiraIssue); Assert.AreEqual(string.Empty, target.GetValueOrDefault("InProgressDate")); Assert.AreEqual(string.Empty, target.GetValueOrDefault("DoneDate")); }
public void ShouldMapUnformattedJiraIssueFields() { var target = JiraIssueCsvMapper.GetCsvFields(_validJiraIssue); Assert.AreEqual(_validJiraIssue.Key, target.GetValueOrDefault("Key")); Assert.AreEqual(_validJiraIssue.Description, target.GetValueOrDefault("Description")); Assert.AreEqual(_validJiraIssue.Type, target.GetValueOrDefault("Type")); Assert.AreEqual(_validJiraIssue.Team, target.GetValueOrDefault("Team")); Assert.AreEqual(_validJiraIssue.Status, target.GetValueOrDefault("Status")); Assert.AreEqual(_validJiraIssue.CycleTime.ToString(), target.GetValueOrDefault("CycleTime")); }