コード例 #1
0
        public async void Test_FlightController_DeleteAsync_ShouldBeOk()
        {
            var deleteCommand = new FlightReservationDeleteCommand()
            {
                FlightReservationId = 1
            };

            _fakeMediator.Setup(mdtr => mdtr.Send(deleteCommand, It.IsAny <CancellationToken>()))
            .ReturnsAsync(true);

            var callback = await _controller.Delete(deleteCommand);


            var response = callback.Should().BeOfType <OkResult>().Subject;
        }
コード例 #2
0
        public void DeleteResTest()
        {
            var result = controller.Delete(1);

            Assert.IsInstanceOf <ActionResult <IEnumerable <String> > >(result);
        }