示例#1
0
        public async void CreateTicket_BadRequest_NullPost()
        {
            TicketViewModel newTicket = null;

            var result = await _sut.CreateTicket(newTicket);

            var badReqResult = Assert.IsType <BadRequestObjectResult>(result);

            Assert.Equal($"Please provide details to create a ticket.", badReqResult.Value);
            _mockManager.Verify(x => x.CreateTicket(
                                    It.IsAny <TicketViewModel>()), Times.Never);
        }