public void AccountHandler_BlockMoney_Succesfull() { var accountService = new Moq.Mock <IAccountService>(); var accountHandler = new AccountHandler(accountService.Object); var serviceId = Guid.NewGuid(); Guid accountId = Guid.NewGuid(); var origin = new Models.Account(); var accountDetail = new Models.AccountDetail() { Id = accountId, Account = origin, Balance = new Money() { Total = 1000, Currency = "BRL" } }; var ammount = new Models.Money(); accountService .Setup(a => a.FindAccount(origin)) .Returns(accountDetail); accountService .Setup(a => a.BlockAmmount(accountId, ammount)) .Returns(serviceId); var transactionId = accountHandler.BlockAmmount(origin, ammount); Assert.Equal(serviceId, transactionId); accountService.Verify(a => a.FindAccount(origin), Moq.Times.Once); accountService.Verify(a => a.BlockAmmount(accountId, ammount), Moq.Times.Once); }