Пример #1
0
        private void AddCases()
        {
            var caseRequest = new CaseRequest
            {
                Name       = GenerateRandomCaseName(),
                Number     = GenerateRandom.CaseNumber(_randomNumber),
                IsLeadCase = HearingData.IS_LEAD_CASE
            };

            _request.Cases.Add(caseRequest);
        }
 public void SetHearingDetails()
 {
     _c.Test.HearingDetails.CaseNumber = $"{GenerateRandom.CaseNumber(_fromRandomNumber)}";
     _browsers[_c.CurrentUser].Clear(HearingDetailsPage.CaseNumberTextfield);
     _browsers[_c.CurrentUser].Driver.WaitUntilVisible(HearingDetailsPage.CaseNumberTextfield).SendKeys(_c.Test.HearingDetails.CaseNumber);
     _browsers[_c.CurrentUser].Driver.WaitUntilTextPresent(HearingDetailsPage.CaseNumberTextfield, _c.Test.HearingDetails.CaseNumber);
     _c.Test.HearingDetails.CaseName = $"Admin Web Automated Test {GenerateRandom.Letters(_fromRandomNumber)}";
     _browsers[_c.CurrentUser].Clear(HearingDetailsPage.CaseNameTextfield);
     _browsers[_c.CurrentUser].Driver.WaitUntilVisible(HearingDetailsPage.CaseNameTextfield).SendKeys(_c.Test.HearingDetails.CaseName);
     _browsers[_c.CurrentUser].Driver.WaitUntilTextPresent(HearingDetailsPage.CaseNameTextfield, _c.Test.HearingDetails.CaseName);
 }
 public BookNewConferenceRequest BuildRequest()
 {
     _request.AudioRecordingRequired = HearingData.AUDIO_RECORDING_REQUIRED;
     _request.CaseName          = $"{AppShortName.FromApplication(Application.TestApi)} {GetCaseNamePrefix()} {GenerateRandom.Letters(_randomNumber)}";
     _request.CaseNumber        = GenerateRandom.CaseNumber(_randomNumber);
     _request.Endpoints         = new List <AddEndpointRequest>();
     _request.HearingRefId      = Guid.NewGuid();
     _request.HearingVenueName  = HearingData.VENUE_NAME;
     _request.Participants      = new BookConferenceParticipantsBuilder(_users, _isCACDCaseType).Build();
     _request.ScheduledDateTime = DateTime.UtcNow.AddMinutes(5);
     _request.ScheduledDuration = HearingData.SCHEDULED_DURATION;
     AddLinkedParticipants();
     return(_request);
 }
Пример #4
0
        public BookNewHearingRequest Build()
        {
            AddParticipants();

            _request.Cases = new List <CaseRequest>()
            {
                new CaseRequest()
                {
                    IsLeadCase = HearingData.IS_LEAD_CASE,
                    Name       = $"BQS {HearingData.AUTOMATED_CASE_NAME_PREFIX} {GenerateRandom.Letters(_randomNumber)}",
                    Number     = GenerateRandom.CaseNumber(_randomNumber)
                }
            };
            return(_request);
        }
        public BookNewConferenceRequestBuilder(string caseName)
        {
            var fromRandomNumber = new Random();

            _bookNewConferenceRequest = Builder <BookNewConferenceRequest> .CreateNew()
                                        .With(x => x.HearingRefId           = Guid.NewGuid())
                                        .With(x => x.CaseType               = "Civil Money Claims")
                                        .With(x => x.ScheduledDateTime      = DateTime.Now.ToLocalTime().AddMinutes(2))
                                        .With(x => x.CaseNumber             = $"{GenerateRandom.CaseNumber(fromRandomNumber)}")
                                        .With(x => x.CaseName               = $"{caseName} {GenerateRandom.Letters(fromRandomNumber)}")
                                        .With(x => x.ScheduledDuration      = 120)
                                        .With(x => x.Participants           = new List <ParticipantRequest>())
                                        .With(x => x.AudioRecordingRequired = false)
                                        .With(x => x.Endpoints              = new List <AddEndpointRequest>())
                                        .Build();
        }
Пример #6
0
        public ConferenceBuilder(bool ignoreId = false, Guid?knownHearingRefId       = null,
                                 DateTime?scheduledDateTime = null, string venueName = "MyVenue")
        {
            _builderSettings = new BuilderSettings();
            if (ignoreId)
            {
                _builderSettings.DisablePropertyNamingFor <Participant, long?>(x => x.TestCallResultId);
                _builderSettings.DisablePropertyNamingFor <ParticipantStatus, long>(x => x.Id);
                _builderSettings.DisablePropertyNamingFor <ConferenceStatus, long>(x => x.Id);
                _builderSettings.DisablePropertyNamingFor <Task, long>(x => x.Id);
            }

            var hearingRefId = knownHearingRefId ?? Guid.NewGuid();

            var          scheduleDateTime  = scheduledDateTime ?? DateTime.UtcNow.AddMinutes(30);
            const string caseType          = "Civil Money Claims";
            var          caseNumber        = $"{GenerateRandom.CaseNumber(new Random())}";
            const string caseName          = CaseName;
            const int    scheduledDuration = 120;

            _conference = new Conference(hearingRefId, caseType, scheduleDateTime, caseNumber, caseName,
                                         scheduledDuration, venueName, false, string.Empty);
        }