public OrganisationPhoneCommunicationCreateTest(TestFixture fixture) : base(fixture) { var organisation = new Organisations(this.Session).Extent().First; var allors = new Organisations(this.Session).FindBy(M.Organisation.Name, "Allors BVBA"); var firstEmployee = allors.ActiveEmployees.First(); this.editCommunicationEvent = new PhoneCommunicationBuilder(this.Session) .WithSubject("dummy") .WithLeftVoiceMail(true) .WithFromParty(firstEmployee) .WithToParty(organisation.CurrentContacts.First) .WithPhoneNumber(organisation.GeneralPhoneNumber) .Build(); this.organisationPhoneNumber = new PartyContactMechanismBuilder(this.Session) .WithContactMechanism(new TelecommunicationsNumberBuilder(this.Session).WithCountryCode("+1").WithAreaCode("111").WithContactNumber("222").Build()) .WithContactPurpose(new ContactMechanismPurposes(this.Session).SalesOffice) .WithUseAsDefault(false) .Build(); organisation.AddPartyContactMechanism(this.organisationPhoneNumber); this.Session.Derive(); this.Session.Commit(); this.Login(); this.organisations = this.Sidenav.NavigateToOrganisations(); }
public PersonPhoneCommunicationEditTest(TestFixture fixture) : base(fixture) { var people = new People(this.Session).Extent(); var person = people.First(v => v.PartyName.Equals("Jane0 Doe0")); var allors = new Organisations(this.Session).FindBy(M.Organisation.Name, "Allors BVBA"); var firstEmployee = allors.ActiveEmployees.First(v => v.FirstName.Equals("first")); this.editCommunicationEvent = new PhoneCommunicationBuilder(this.Session) .WithSubject("dummy") .WithLeftVoiceMail(true) .WithFromParty(person) .WithToParty(firstEmployee) .WithPhoneNumber(person.GeneralPhoneNumber) .Build(); this.anotherPhoneNumber = new PartyContactMechanismBuilder(this.Session) .WithContactMechanism(new TelecommunicationsNumberBuilder(this.Session).WithCountryCode("+1").WithAreaCode("111").WithContactNumber("222").Build()) .WithContactPurpose(new ContactMechanismPurposes(this.Session).SalesOffice) .WithUseAsDefault(false) .Build(); person.AddPartyContactMechanism(this.anotherPhoneNumber); this.Session.Derive(); this.Session.Commit(); var dashboard = this.Login(); this.people = dashboard.Sidenav.NavigateToPersonList(); }