Ejemplo n.º 1
0
        public async Task GetAgileItem_Valid_Success()
        {
            // Arrange
            // Act
            var item = await _agileItemRepository.GetFullAgileItem(_stubStoryDto.Id);

            // Assert
            Assert.IsNotNull(item);
            Assert.AreEqual(_stubStoryDto.AgileItemType, item.AgileItemType);
            Assert.AreEqual(_stubStoryDto.AssigneeId, item.AssigneeId);
            Assert.AreEqual(_stubStoryDto.AssigneeName, item.AssigneeName);
            Assert.AreEqual(_stubStoryDto.BlockedReason, item.BlockedReason);
            Assert.AreEqual(_stubStoryDto.BoardId, item.BoardId);
            Assert.AreEqual(_stubStoryDto.CreatedBy, item.CreatedBy);
            Assert.AreEqual(_stubStoryDto.CreatedOn, item.CreatedOn);
            Assert.AreEqual(_stubStoryDto.Description, item.Description);
            Assert.AreEqual(_stubStoryDto.DueBy, item.DueBy);
            Assert.AreEqual(_stubStoryDto.EstimatedTime, item.EstimatedTime);
            Assert.AreEqual(_stubStoryDto.IsActive, item.IsActive);
            Assert.AreEqual(_stubStoryDto.IsComplete, item.IsComplete);
            Assert.AreEqual(_stubStoryDto.LoggedTime, item.LoggedTime);
            Assert.AreEqual(_stubStoryDto.Order, item.Order);
            Assert.AreEqual(_stubStoryDto.ParentId, item.ParentId);
            Assert.AreEqual(_stubStoryDto.Priority, item.Priority);
            Assert.AreEqual(_stubStoryDto.Status, item.Status);
            Assert.AreEqual(_stubStoryDto.StoryPoints, item.StoryPoints);
            Assert.AreEqual(_stubStoryDto.Title, item.Title);
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> GetFullAgileItem(Guid id)
        {
            var item = await _agileItemRepository.GetFullAgileItem(id);

            if (item != null)
            {
                return(Ok(item));
            }
            return(new StatusCodeResult(500));
        }