public async Task ContactAccountExistsAsync_WhenAccountNumberExistsWithinAccounting_ReturnsTrue() { IAccountingRepository sut = CreateSut(); bool result = await sut.ContactAccountExistsAsync(WithExistingAccountingNumber(), WithExistingAccountNumberForContactAccount()); Assert.That(result, Is.True); }
public async Task ContactAccountExistsAsync_WhenAccountingNumberDoesNotExist_ReturnsFalse() { IAccountingRepository sut = CreateSut(); bool result = await sut.ContactAccountExistsAsync(WithNonExistingAccountingNumber(), WithExistingAccountNumberForContactAccount()); Assert.That(result, Is.False); }
public void ContactAccountExistsAsync_WhenAccountNumberIsWhiteSpace_ThrowsArgumentNullException() { IAccountingRepository sut = CreateSut(); ArgumentNullException result = Assert.ThrowsAsync <ArgumentNullException>(async() => await sut.ContactAccountExistsAsync(WithExistingAccountingNumber(), " ")); Assert.That(result.ParamName, Is.EqualTo("accountNumber")); }