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();
        }
Exemple #2
0
        public PartyContactMechanismEditTest(TestFixture fixture)
            : base(fixture)
        {
            var people = new People(this.Session).Extent();
            var person = people.First(v => v.PartyName.Equals("John0 Doe0"));

            var postalAddress = new PostalAddressBuilder(this.Session)
                                .WithAddress1("Haverwerf 15")
                                .WithPostalBoundary(new PostalBoundaryBuilder(this.Session)
                                                    .WithLocality("city")
                                                    .WithPostalCode("1111")
                                                    .WithCountry(new Countries(this.Session).FindBy(M.Country.IsoCode, "BE"))
                                                    .Build())
                                .Build();

            this.editPartyContactMechanism = new PartyContactMechanismBuilder(this.Session).WithContactMechanism(postalAddress).Build();
            person.AddPartyContactMechanism(this.editPartyContactMechanism);

            this.Session.Derive();
            this.Session.Commit();

            var dashboard = this.Login();

            this.people = dashboard.Sidenav.NavigateToPersonList();
        }
        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();
        }
Exemple #4
0
        public PartyContactMechanismCreateTest(TestFixture fixture)
            : base(fixture)
        {
            var person = new People(this.Session).Extent().First;

            var postalAddress = new PostalAddressBuilder(this.Session)
                                .WithAddress1("Haverwerf 15")
                                .WithLocality("city")
                                .WithPostalCode("1111")
                                .WithCountry(new Countries(this.Session).FindBy(M.Country.IsoCode, "BE"))
                                .Build();

            this.editPartyContactMechanism = new PartyContactMechanismBuilder(this.Session).WithContactMechanism(postalAddress).Build();
            person.AddPartyContactMechanism(this.editPartyContactMechanism);

            this.Session.Derive();
            this.Session.Commit();

            this.Login();
            this.people = this.Sidenav.NavigateToPeople();
        }