Updated ef migrations.

This commit is contained in:
2026-07-29 13:03:30 +02:00
parent 44846eaa13
commit acc8423fc6
10 changed files with 410 additions and 22 deletions
@@ -5,6 +5,29 @@ namespace FinancialApi.Application.UnitTests;
public class AccountTests
{
[Theory]
[InlineData(AccountType.Credit)]
public void CreateCreditAccountType_ShouldAllowNegativeBalance(AccountType accountType)
{
var act = () => new Account(1, -100, accountType);
act()
.Balance.Should()
.BeNegative();
}
[Theory]
[InlineData(AccountType.Debit)]
[InlineData(AccountType.Revenue)]
[InlineData(AccountType.Liability)]
public void CreateDebitAccountType_ShouldNotAllowNegativeBalance(AccountType accountType)
{
var act = () => new Account(1, -100, accountType);
act.Should()
.Throw<InvalidStartingBalanceException>();
}
[Theory]
[InlineData(AccountType.Credit)]
public void GivenCreditAccountType_ShouldAllowNegativeBalance(AccountType accountType)