Beispiel #1
0
        public async Task Put_Complete_Toggle_Item_By_Id_Returns_Bad_Request_Item_Not_Found()
        {
            //Arrange
            ReceiveItemViewModel receiveItemViewModel = new ReceiveItemViewModel()
            {
                Description = "Item",
                IsShared    = false,
                IsDone      = false
            };

            int wrongId = 9999;

            //Act
            var iactionResult = await _itemsController.Complete(wrongId) as ObjectResult;

            //Assert
            Assert.IsType <BadRequestObjectResult>(iactionResult);
            Assert.Equal(400, iactionResult.StatusCode);
            Assert.Equal($"Item does not exist.", iactionResult.Value);
        }