Ejemplo n.º 1
0
        public async Task BudgetAccountExistsAsync_WhenAccountNumberExistsWithinAccounting_ReturnsTrue()
        {
            IAccountingRepository sut = CreateSut();

            bool result = await sut.BudgetAccountExistsAsync(WithExistingAccountingNumber(), WithExistingAccountNumberForBudgetAccount());

            Assert.That(result, Is.True);
        }
Ejemplo n.º 2
0
        public async Task BudgetAccountExistsAsync_WhenAccountingNumberDoesNotExist_ReturnsFalse()
        {
            IAccountingRepository sut = CreateSut();

            bool result = await sut.BudgetAccountExistsAsync(WithNonExistingAccountingNumber(), WithExistingAccountNumberForBudgetAccount());

            Assert.That(result, Is.False);
        }
Ejemplo n.º 3
0
        public void BudgetAccountExistsAsync_WhenAccountNumberIsWhiteSpace_ThrowsArgumentNullException()
        {
            IAccountingRepository sut = CreateSut();

            ArgumentNullException result = Assert.ThrowsAsync <ArgumentNullException>(async() => await sut.BudgetAccountExistsAsync(WithExistingAccountingNumber(), " "));

            Assert.That(result.ParamName, Is.EqualTo("accountNumber"));
        }