Пример #1
0
        public async Task <IActionResult> UpdateAgileItem([FromBody] BoardTaskVm updatedTask)
        {
            var success = await _agileItemRepository.UpdateAgileItem(updatedTask);

            if (success)
            {
                return(Ok(success));
            }
            return(new StatusCodeResult(500));
        }
Пример #2
0
        public async Task UpdateAgileItem_Valid_Success()
        {
            // Arrange
            var updatedItem = new BoardTaskVm()
            {
                Id           = Guid.Parse("5eb09b45-9c70-4465-b62d-535e28b16aed"),
                AssigneeId   = Guid.Parse("0f294219-704d-40a5-afe9-a74fffa7003f"),
                AssigneeName = "Oli",
                Description  = "Updated",
                Order        = 3,
                Priority     = Models.Types.Priority.Low,
                Status       = Models.Types.Status.Complete,
                Title        = "Updated title"
            };

            // Act
            var success = await _agileItemRepository.UpdateAgileItem(updatedItem);

            // Assert
            Assert.IsNotNull(success);
            Assert.IsTrue(success);
        }