コード例 #1
0
        public PersonOverviewTest(TestFixture fixture)
            : base(fixture)
        {
            var dashboard = this.Login();

            this.people = dashboard.Sidenav.NavigateToPersonList();
        }
コード例 #2
0
        public PersonEmploymentEditTest(TestFixture fixture)
            : base(fixture)
        {
            var allors = new Organisations(this.Session).FindBy(M.Organisation.Name, "Allors BVBA");

            this.employee = new PersonBuilder(this.Session).WithLastName("employee").Build();

            // Delete all existing for the new one to be in the first page of the list.
            foreach (PartyRelationship partyRelationship in allors.PartyRelationshipsWhereParty)
            {
                partyRelationship.Delete();
            }

            this.editPartyRelationship = new EmploymentBuilder(this.Session)
                                         .WithEmployee(this.employee)
                                         .WithEmployer(allors)
                                         .Build();

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

            var dashboard = this.Login();

            this.people = dashboard.Sidenav.NavigateToPersonList();
        }
コード例 #3
0
        public WebAddressEditTest(TestFixture fixture)
            : base(fixture)
        {
            var dashboard = this.Login();

            this.personListPage = dashboard.Sidenav.NavigateToPersonList();
        }
コード例 #4
0
        public PersonFaceToFaceCommunicationEditTest(TestFixture fixture)
            : base(fixture)
        {
            var dashboard = this.Login();

            this.personListPage = dashboard.Sidenav.NavigateToPersonList();
        }
コード例 #5
0
        public CustomerRelationshipEditTest(TestFixture fixture)
            : base(fixture)
        {
            var dashboard = this.Login();

            this.personListPage = dashboard.Sidenav.NavigateToPersonList();
        }
コード例 #6
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();
        }
コード例 #7
0
        public PersonLetterCorrespondenceEditTest(TestFixture fixture)
            : base(fixture)
        {
            var dashboard = this.Login();

            this.personListPage = dashboard.Sidenav.NavigateToPersonList();
        }
コード例 #8
0
        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();
        }
コード例 #9
0
        public PersonOrganisationContactRelationshipEditTest(TestFixture fixture)
            : base(fixture)
        {
            this.organisation = new OrganisationBuilder(this.Session).WithName("organisation").Build();
            this.contact      = new PersonBuilder(this.Session).WithLastName("contact").Build();

            this.editPartyRelationship = new OrganisationContactRelationshipBuilder(this.Session)
                                         .WithContactKind(new OrganisationContactKinds(this.Session).GeneralContact)
                                         .WithContact(this.contact)
                                         .WithOrganisation(this.organisation)
                                         .Build();

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

            var dashboard = this.Login();

            this.people = dashboard.Sidenav.NavigateToPersonList();
        }
コード例 #10
0
        public TelecommunicationsNumberEditTest(TestFixture fixture)
            : base(fixture)
        {
            var people = new People(this.Session).Extent();
            var person = people.First(v => v.PartyName.Equals("John0 Doe0"));

            this.editContactMechanism = new TelecommunicationsNumberBuilder(this.Session)
                                        .WithCountryCode("0032")
                                        .WithAreaCode("498")
                                        .WithContactNumber("123 456")
                                        .Build();

            var partyContactMechanism = new PartyContactMechanismBuilder(this.Session).WithContactMechanism(this.editContactMechanism).Build();

            person.AddPartyContactMechanism(partyContactMechanism);

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

            var dashboard = this.Login();

            this.people = dashboard.Sidenav.NavigateToPersonList();
        }