Example #1
0
        public async Task DeleteCityAsync_Should_Return_NoContentResult()
        {
            var cityId     = Guid.NewGuid();
            var rowVersion = new byte[] { 1, 2, 4, 8, 16, 32, 64 };

            _communicationBusMock.Setup(x => x.SendCommandAsync(It.IsAny <DeleteCityCommand>(), It.IsAny <CancellationToken>()))
            .Returns(Task.CompletedTask);

            var result = await _controller.DeleteCityAsync(cityId, rowVersion);

            var noContentResult = result.As <NoContentResult>();

            noContentResult.Should().NotBeNull();
        }