public void GivenOrganisationGlAccount_WhenNotReferenced_ThenAccountIsNeutral() { var generalLedgerAccount = new GeneralLedgerAccountBuilder(this.Session) .WithAccountNumber("0001") .WithName("GeneralLedgerAccount") .WithBalanceSheetAccount(true) .WithSide(new DebitCreditConstants(this.Session).Debit) .WithGeneralLedgerAccountType(new GeneralLedgerAccountTypeBuilder(this.Session).WithDescription("accountType").Build()) .WithGeneralLedgerAccountGroup(new GeneralLedgerAccountGroupBuilder(this.Session).WithDescription("accountGroup").Build()) .Build(); var organisationGlAccount = new OrganisationGlAccountBuilder(this.Session) .WithGeneralLedgerAccount(generalLedgerAccount) .Build(); Assert.True(organisationGlAccount.IsNeutralAccount()); Assert.False(organisationGlAccount.IsBankAccount()); Assert.False(organisationGlAccount.IsCashAccount()); Assert.False(organisationGlAccount.IsCostAccount()); Assert.False(organisationGlAccount.IsCreditorAccount()); Assert.False(organisationGlAccount.IsDebtorAccount()); Assert.False(organisationGlAccount.IsInventoryAccount()); Assert.False(organisationGlAccount.IsTurnOverAccount()); }
public void GivenOrganisationGlAccount_WhenNotReferenced_ThenAccountIsNeutral() { var internalOrganisation = new InternalOrganisations(this.DatabaseSession).FindBy(InternalOrganisations.Meta.Name, "internalOrganisation"); var generalLedgerAccount = new GeneralLedgerAccountBuilder(this.DatabaseSession) .WithAccountNumber("0001") .WithName("GeneralLedgerAccount") .WithBalanceSheetAccount(true) .WithSide(new DebitCreditConstants(this.DatabaseSession).Debit) .WithGeneralLedgerAccountType(new GeneralLedgerAccountTypeBuilder(this.DatabaseSession).WithDescription("accountType").Build()) .WithGeneralLedgerAccountGroup(new GeneralLedgerAccountGroupBuilder(this.DatabaseSession).WithDescription("accountGroup").Build()) .Build(); var organisationGlAccount = new OrganisationGlAccountBuilder(this.DatabaseSession) .WithInternalOrganisation(internalOrganisation) .WithGeneralLedgerAccount(generalLedgerAccount) .Build(); Assert.IsTrue(organisationGlAccount.IsNeutralAccount()); Assert.IsFalse(organisationGlAccount.IsBankAccount()); Assert.IsFalse(organisationGlAccount.IsCashAccount()); Assert.IsFalse(organisationGlAccount.IsCostAccount()); Assert.IsFalse(organisationGlAccount.IsCreditorAccount()); Assert.IsFalse(organisationGlAccount.IsDebtorAccount()); Assert.IsFalse(organisationGlAccount.IsInventoryAccount()); Assert.IsFalse(organisationGlAccount.IsTurnOverAccount()); }