public void Create()
        {
            var allors   = new Organisations(this.Session).FindBy(M.Organisation.Name, "Allors BVBA");
            var employee = allors.ActiveEmployees.First;

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

            var organisation = allors.ActiveCustomers.First(v => v.GetType().Name == typeof(Organisation).Name);
            var contact      = organisation.CurrentContacts.First;

            this.organisationListPage.Table.DefaultAction(organisation);
            var faceToFaceCommunicationEdit = new OrganisationOverviewComponent(this.organisationListPage.Driver).CommunicationeventOverviewPanel.Click().CreateFaceToFaceCommunication();

            faceToFaceCommunicationEdit
            .CommunicationEventState.Select(new CommunicationEventStates(this.Session).Completed)
            .EventPurposes.Toggle(new CommunicationEventPurposes(this.Session).Appointment)
            .Location.Set("location")
            .Subject.Set("subject")
            .FromParty.Select(employee)
            .ToParty.Select(contact)
            .ScheduledStart.Set(DateTimeFactory.CreateDate(2018, 12, 22))
            .ScheduledEnd.Set(DateTimeFactory.CreateDate(2018, 12, 22))
            .ActualStart.Set(DateTimeFactory.CreateDate(2018, 12, 23))
            .ActualEnd.Set(DateTimeFactory.CreateDate(2018, 12, 23))
            .SAVE.Click();

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

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

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

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

            Assert.Equal(new CommunicationEventStates(this.Session).Completed, communicationEvent.CommunicationEventState);
            Assert.Contains(new CommunicationEventPurposes(this.Session).Appointment, communicationEvent.EventPurposes);
            Assert.Equal(employee, communicationEvent.FromParty);
            Assert.Equal(contact, communicationEvent.ToParty);
            Assert.Equal("location", communicationEvent.Location);
            Assert.Equal("subject", communicationEvent.Subject);
            // Assert.Equal(DateTimeFactory.CreateDate(2018, 12, 22).Date, communicationEvent.ScheduledStart.Value.ToUniversalTime().Date);
            // Assert.Equal(DateTimeFactory.CreateDate(2018, 12, 22).Date, communicationEvent.ScheduledEnd.Value.Date.ToUniversalTime().Date);
            // Assert.Equal(DateTimeFactory.CreateDate(2018, 12, 23).Date, communicationEvent.ActualStart.Value.Date.ToUniversalTime().Date);
            // Assert.Equal(DateTimeFactory.CreateDate(2018, 12, 23).Date, communicationEvent.ActualEnd.Value.Date.ToUniversalTime().Date);
        }
        public void Create()
        {
            var allors   = new Organisations(this.Session).FindBy(M.Organisation.Name, "Allors BVBA");
            var employee = allors.ActiveEmployees.First;

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

            var extent       = new Organisations(this.Session).Extent();
            var organisation = extent.First(v => v.PartyName.Equals("Acme0"));
            var contact      = organisation.CurrentContacts.First;

            var personOverview = this.organisationListPage.Select(organisation);
            var page           = personOverview.NewFaceToFaceCommunication();

            page.EventState.Set(new CommunicationEventStates(this.Session).Completed.Name)
            .Purposes.Toggle(new CommunicationEventPurposes(this.Session).Appointment.Name)
            .Location.Set("location")
            .Subject.Set("subject")
            .FromParty.Set(employee.PartyName)
            .ToParty.Set(contact.PartyName)
            .ScheduledStart.Set(DateTimeFactory.CreateDate(2018, 12, 22))
            .ScheduledEnd.Set(DateTimeFactory.CreateDate(2018, 12, 22))
            .ActualStart.Set(DateTimeFactory.CreateDate(2018, 12, 23))
            .ActualEnd.Set(DateTimeFactory.CreateDate(2018, 12, 23))
            .Save.Click();

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

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

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

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

            Assert.Equal(new CommunicationEventStates(this.Session).Completed, communicationEvent.CommunicationEventState);
            Assert.Contains(new CommunicationEventPurposes(this.Session).Appointment, communicationEvent.EventPurposes);
            Assert.Equal(employee, communicationEvent.FromParty);
            Assert.Equal(contact, communicationEvent.ToParty);
            Assert.Equal("location", communicationEvent.Location);
            Assert.Equal("subject", communicationEvent.Subject);
            //Assert.Equal(DateTimeFactory.CreateDate(2018, 12, 22).Date, communicationEvent.ScheduledStart.Value.ToUniversalTime().Date);
            //Assert.Equal(DateTimeFactory.CreateDate(2018, 12, 22).Date, communicationEvent.ScheduledEnd.Value.Date.ToUniversalTime().Date);
            //Assert.Equal(DateTimeFactory.CreateDate(2018, 12, 23).Date, communicationEvent.ActualStart.Value.Date.ToUniversalTime().Date);
            //Assert.Equal(DateTimeFactory.CreateDate(2018, 12, 23).Date, communicationEvent.ActualEnd.Value.Date.ToUniversalTime().Date);
        }