Exemple #1
0
        public async Task TransactionValidator_ReturnsCommitted_WhenRepositoryReturnsCommittedInt()
        {
            // arrange
            const TransactionStatus expectedStatus = TransactionStatus.Committed;

            _baseRepoMock.Setup(m => m.GetTransactionStatus(It.IsAny <long>())).ReturnsAsync((int)expectedStatus);
            // act
            var status = await _transactionValidator.GetStatus(_message, _tenant, _baseRepoMock.Object);

            // assert
            Assert.AreEqual(expectedStatus, status);
            _baseRepoMock.Verify(m => m.GetTransactionStatus(It.IsAny <long>()), Times.Once);
        }