public void GivenOwnBankAccount_WhenDeriving_ThenBankAccountRelationMustExist() { var netherlands = new Countries(this.Session).CountryByIsoCode["NL"]; var euro = netherlands.Currency; var bank = new BankBuilder(this.Session).WithCountry(netherlands).WithName("RABOBANK GROEP").WithBic("RABONL2U").Build(); var bankAccount = new BankAccountBuilder(this.Session).WithBank(bank).WithCurrency(euro).WithIban("NL50RABO0109546784").WithNameOnAccount("Martien").Build(); this.Session.Commit(); var builder = new OwnBankAccountBuilder(this.Session); builder.Build(); Assert.True(this.Session.Derive(false).HasErrors); this.Session.Rollback(); builder.WithBankAccount(bankAccount); builder.Build(); Assert.False(this.Session.Derive(false).HasErrors); }