Пример #1
0
        public void CheckingAccounts_Service_UpdateStatus_Should_Be_OK()
        {
            //Arrange
            var returns = true;
            var id      = 1;

            _mockRepositoryAccount.Setup(r => r.GetById(_checkingAccount.Id))
            .Returns(_checkingAccount);

            _mockRepositoryAccount.Setup(r => r.Update(_checkingAccount))
            .Returns(returns);

            //Action
            var updated = _service.UpdateStatus(id);

            //Verify
            updated.Should().Be(returns);
            _mockRepositoryAccount.Verify(r => r.Update(_checkingAccount));
            _mockRepositoryAccount.Verify(r => r.GetById(id));
        }
Пример #2
0
 public IHttpActionResult UpdateStatus(long id)
 {
     return(HandleCallback(() => _accountsService.UpdateStatus(id)));
 }
Пример #3
0
 public IHttpActionResult UpdateStatus(CheckingAccount account)
 {
     return(HandleCallback(() => _accountsService.UpdateStatus(account.Id)));
 }