예제 #1
0
        public void ShouldMapFormattedTimeDateFields()
        {
            var target = JiraIssueCsvMapper.GetCsvFields(_validJiraIssue);

            Assert.AreEqual(_validJiraIssue.InProgressDate.ToDisplayDate(), target.GetValueOrDefault("InProgressDate"));
            Assert.AreEqual(_validJiraIssue.DoneDate.ToDisplayDate(), target.GetValueOrDefault("DoneDate"));
        }
예제 #2
0
        public void ShouldMapEmptyCycleTimeToBlank()
        {
            _validJiraIssue.CycleTime = null;

            var target = JiraIssueCsvMapper.GetCsvFields(_validJiraIssue);

            Assert.AreEqual(string.Empty, target.GetValueOrDefault("CycleTime"));
        }
예제 #3
0
        public void ShouldMapTimeInStateDates()
        {
            var target = JiraIssueCsvMapper.GetCsvFields(_validJiraIssue);

            _validJiraIssue.TimeInStates.ForEach(state =>
            {
                Assert.AreEqual(state.Date.ToDisplayDate(), target.GetValueOrDefault(state.StateName));
            });
        }
예제 #4
0
        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"));
        }
예제 #5
0
        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"));
        }