Exemplo n.º 1
0
        public void Create()
        {
            var before = new WebAddresses(this.Session).Extent().ToArray();

            var person = new People(this.Session).Extent().First;

            this.personListPage.Table.DefaultAction(person);
            var webAddressCreate = new PersonOverviewComponent(this.personListPage.Driver).ContactmechanismOverviewPanel.Click().CreateWebAddress();

            webAddressCreate
            .ContactPurposes.Toggle(new ContactMechanismPurposes(this.Session).GeneralEmail)
            .ElectronicAddressString.Set("wwww.allors.com")
            .Description.Set("description")
            .SAVE.Click();

            this.Driver.WaitForAngular();
            this.Session.Rollback();

            var after = new WebAddresses(this.Session).Extent().ToArray();

            Assert.Equal(after.Length, before.Length + 1);

            var contactMechanism = after.Except(before).First();

            Assert.Equal("wwww.allors.com", contactMechanism.ElectronicAddressString);
            Assert.Equal("description", contactMechanism.Description);
        }
Exemplo n.º 2
0
        public void Edit()
        {
            var extent = new People(this.Session).Extent();
            var person = extent.First(v => v.PartyName.Equals("John0 Doe0"));

            var editContactMechanism = new WebAddressBuilder(this.Session)
                                       .WithElectronicAddressString("www.acme.com")
                                       .Build();

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

            person.AddPartyContactMechanism(partyContactMechanism);

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

            var before = new WebAddresses(this.Session).Extent().ToArray();

            var page = this.personListPage.Select(person).SelectElectronicAddress(editContactMechanism);

            page.ElectronicAddressString.Set("wwww.allors.com")
            .Description.Set("description")
            .Save.Click();

            this.Driver.WaitForAngular();
            this.Session.Rollback();

            var after = new WebAddresses(this.Session).Extent().ToArray();

            Assert.Equal(after.Length, before.Length);

            Assert.Equal("wwww.allors.com", editContactMechanism.ElectronicAddressString);
            Assert.Equal("description", editContactMechanism.Description);
        }
Exemplo n.º 3
0
        public void Edit()
        {
            var person = new People(this.Session).Extent().First;

            var before = new WebAddresses(this.Session).Extent().ToArray();

            this.personListPage.Table.DefaultAction(person);
            var personOverview = new PersonOverviewComponent(this.personListPage.Driver);

            var contactMechanismOverview = personOverview.ContactmechanismOverviewPanel.Click();

            contactMechanismOverview.Table.DefaultAction(editContactMechanism);

            var webAddressEdit = new WebAddressEditComponent(this.Driver);

            webAddressEdit
            .ElectronicAddressString.Set("wwww.allors.com")
            .Description.Set("description")
            .SAVE.Click();

            this.Driver.WaitForAngular();
            this.Session.Rollback();

            var after = new WebAddresses(this.Session).Extent().ToArray();

            Assert.Equal(after.Length, before.Length);

            Assert.Equal("wwww.allors.com", editContactMechanism.ElectronicAddressString);
            Assert.Equal("description", editContactMechanism.Description);
        }
Exemplo n.º 4
0
        public void Create()
        {
            var before = new WebAddresses(this.Session).Extent().ToArray();

            var extent = new People(this.Session).Extent();
            var person = extent.First(v => v.PartyName.Equals("John0 Doe0"));

            var personOverview = this.personListPage.Select(person);
            var page           = personOverview.NewWebAddress();

            page.ContactPurposes.Toggle(new ContactMechanismPurposes(this.Session).BillingAddress.Name)
            .ElectronicAddressString.Set("wwww.allors.com")
            .Description.Set("description")
            .Save.Click();

            this.Driver.WaitForAngular();
            this.Session.Rollback();

            var after = new WebAddresses(this.Session).Extent().ToArray();

            Assert.Equal(after.Length, before.Length + 1);

            var contactMechanism = after.Except(before).First();

            Assert.Equal("wwww.allors.com", contactMechanism.ElectronicAddressString);
            Assert.Equal("description", contactMechanism.Description);
        }