public async Task DeleteAccounting_WhenCalled_ReturnsRedirectToActionResultWhereRouteValuesIsNull()
        {
            Controller sut = CreateSut();

            RedirectToActionResult result = (RedirectToActionResult)await sut.DeleteAccounting(_fixture.Create <int>());

            Assert.That(result.RouteValues, Is.Null);
        }
        public async Task DeleteAccounting_WhenCalled_ReturnsRedirectToActionResult()
        {
            Controller sut = CreateSut();

            IActionResult result = await sut.DeleteAccounting(_fixture.Create <int>());

            Assert.That(result, Is.TypeOf <RedirectToActionResult>());
        }
        public async Task DeleteAccounting_WhenCalled_ReturnsRedirectToActionResultWhereActionNameIsEqualToAccountings()
        {
            Controller sut = CreateSut();

            RedirectToActionResult result = (RedirectToActionResult)await sut.DeleteAccounting(_fixture.Create <int>());

            Assert.That(result.ActionName, Is.EqualTo("Accountings"));
        }
        public async Task DeleteAccounting_WhenCalled_AssertPublishAsyncWasCalledOnCommandBus()
        {
            Controller sut = CreateSut();

            int accountingNumber = _fixture.Create <int>();
            await sut.DeleteAccounting(accountingNumber);

            _commandBusMock.Verify(m => m.PublishAsync(It.Is <IDeleteAccountingCommand>(command => command != null && command.AccountingNumber == accountingNumber)), Times.Once);
        }