private void InstantiateObjects(ISession session) { this.contact = (Person)session.Instantiate(this.contact); this.supplier = (Organisation)session.Instantiate(this.supplier); this.supplierRelationship = (SupplierRelationship)session.Instantiate(this.supplierRelationship); this.organisationContactRelationship = (OrganisationContactRelationship)session.Instantiate(this.organisationContactRelationship); }
public OrganisationContactRelationshipTests() { this.organisation = (Organisation)this.InternalOrganisation.ActiveCustomers.FirstOrDefault(v => v.GetType().Name == typeof(Organisation).Name); this.organisationContactRelationship = this.organisation.OrganisationContactRelationshipsWhereOrganisation.FirstOrDefault(); this.contact = this.organisationContactRelationship.Contact; this.Session.Derive(); this.Session.Commit(); }
public SubContractorRelationshipTests() { this.subcontractor = this.InternalOrganisation.CreateSubContractor(this.Session.Faker()); this.Session.Derive(); this.Session.Commit(); this.subContractorRelationship = this.subcontractor.SubContractorRelationshipsWhereSubContractor.First(); this.organisationContactRelationship = this.subcontractor.OrganisationContactRelationshipsWhereOrganisation.First(); this.contact = this.organisationContactRelationship.Contact; }
public OrganisationContactRelationshipTests() { this.contact = new PersonBuilder(this.Session).WithLastName("organisationContact").Build(); this.organisationContactRelationship = new OrganisationContactRelationshipBuilder(this.Session) .WithContact(this.contact) .WithOrganisation(new Organisations(this.Session).FindBy(M.Organisation.Name, "customer")) .WithFromDate(DateTime.UtcNow.AddYears(-1)) .Build(); this.Session.Derive(); this.Session.Commit(); }
public SupplierRelationshipTests() { this.contact = new PersonBuilder(this.Session).WithLastName("contact").Build(); this.supplier = new OrganisationBuilder(this.Session) .WithName("supplier") .WithLocale(new Locales(this.Session).EnglishGreatBritain) .Build(); this.organisationContactRelationship = new OrganisationContactRelationshipBuilder(this.Session) .WithOrganisation(this.supplier) .WithContact(this.contact) .WithFromDate(DateTime.UtcNow) .Build(); this.supplierRelationship = new SupplierRelationshipBuilder(this.Session) .WithSupplier(this.supplier) .WithFromDate(DateTime.UtcNow.AddYears(-1)) .Build(); this.Session.Derive(); this.Session.Commit(); }
private void InstantiateObjects(ISession session) { this.contact = (Person)session.Instantiate(this.contact); this.organisationContactRelationship = (OrganisationContactRelationship)session.Instantiate(this.organisationContactRelationship); }
public override void Init() { base.Init(); this.contact = new PersonBuilder(this.DatabaseSession).WithLastName("organisationContact").Build(); this.organisationContactRelationship = new OrganisationContactRelationshipBuilder(this.DatabaseSession) .WithContact(this.contact) .WithOrganisation(new Organisations(this.DatabaseSession).FindBy(Organisations.Meta.Name, "customer")) .WithFromDate(DateTime.UtcNow) .Build(); this.DatabaseSession.Derive(true); this.DatabaseSession.Commit(); }
private void InstantiateObjects(ISession session) { this.contact = (Person)session.Instantiate(this.contact); this.partner = (Organisation)session.Instantiate(this.partner); this.internalOrganisation = (InternalOrganisation)session.Instantiate(this.internalOrganisation); this.contactRelationship = (OrganisationContactRelationship)session.Instantiate(this.contactRelationship); this.partnership = (Partnership)session.Instantiate(this.partnership); }
public override void Init() { base.Init(); this.contact = new PersonBuilder(this.DatabaseSession).WithLastName("contact").Build(); this.partner = new OrganisationBuilder(this.DatabaseSession).WithName("partner").WithLocale(new Locales(this.DatabaseSession).EnglishGreatBritain).Build(); this.internalOrganisation = new InternalOrganisations(this.DatabaseSession).FindBy(InternalOrganisations.Meta.Name, "internalOrganisation"); this.partnership = new PartnershipBuilder(this.DatabaseSession) .WithPartner(this.partner) .WithInternalOrganisation(this.internalOrganisation) .WithFromDate(DateTime.UtcNow) .Build(); this.contactRelationship = new OrganisationContactRelationshipBuilder(this.DatabaseSession) .WithOrganisation(this.partner) .WithContact(this.contact) .WithFromDate(DateTime.UtcNow) .Build(); this.DatabaseSession.Derive(true); this.DatabaseSession.Commit(); }