Пример #1
0
        public void TestInitialize()
        {
            _australia = _locationQuery.GetCountry("Australia");

            Resolve <IDbConnectionFactory>().DeleteAllTestData();
            JobAdSearchHost.ClearIndex();

            var employer = _employerAccountsCommand.CreateTestEmployer("jobposter", _organisationsCommand.CreateTestOrganisation("The Job Advertiser"));

            _one                    = employer.CreateTestJobAd("Title one", "The content for the first ad");
            _one.CreatedTime        = DateTime.Now.AddDays(-1); // Just to make sure it's before "two"; we only index days.
            _one.Description.Salary = new Salary {
                LowerBound = 50000, UpperBound = 60000, Rate = SalaryRate.Year, Currency = Currency.AUD
            };
            _jobAdsCommand.CreateJobAd(_one);
            _jobAdsCommand.OpenJobAd(_one);

            _two = employer.CreateTestJobAd("Title two", "Different content for the second ad");
            _locationQuery.ResolvePostalSuburb(_two.Description.Location, _australia, "2000");
            _two.Description.CompanyName = "Really Bad Employers";
            _two.Description.JobTypes    = JobTypes.Contract;
            _two.Description.Industries  = new List <Industry> {
                _industriesQuery.GetIndustry("Other")
            };
            _jobAdsCommand.CreateJobAd(_two);
            _jobAdsCommand.OpenJobAd(_two);
        }
Пример #2
0
 public static void AssemblyInitialize(TestContext context)
 {
     InitialiseContainer();
     ApplicationContext.SetupApplications(WebSite.Integration);
     JobAdSearchHost.Start();
     JobAdSortHost.Start();
 }
Пример #3
0
 public static void AssemblyInitialize(TestContext context)
 {
     InitialiseContainer();
     ApplicationContext.SetupApplications(WebSite.Management);
     MemberSearchHost.Start();
     JobAdSearchHost.Start();
 }
Пример #4
0
        public void TestInitialize()
        {
            JobAdSearchHost.Stop();
            JobAdSortHost.Stop();
            StartSearchHosts();
            StartSortHosts();

            _titleTextBox               = new HtmlTextBoxTester(Browser, "Title");
            _positionTitleTextBox       = new HtmlTextBoxTester(Browser, "PositionTitle");
            _bulletPoint1TextBox        = new HtmlTextBoxTester(Browser, "BulletPoint1");
            _bulletPoint2TextBox        = new HtmlTextBoxTester(Browser, "BulletPoint2");
            _bulletPoint3TextBox        = new HtmlTextBoxTester(Browser, "BulletPoint3");
            _summaryTextBox             = new HtmlTextAreaTester(Browser, "Summary");
            _contentTextBox             = new HtmlTextAreaTester(Browser, "Content");
            _emailAddressTextBox        = new HtmlTextBoxTester(Browser, "EmailAddress");
            _locationTextBox            = new HtmlTextBoxTester(Browser, "Location");
            _companyNameTextBox         = new HtmlTextBoxTester(Browser, "CompanyName");
            _residencyRequiredCheckBox  = new HtmlCheckBoxTester(Browser, "ResidencyRequired");
            _industryIdsListBox         = new HtmlListBoxTester(Browser, "IndustryIds");
            _fullTimeCheckBox           = new HtmlCheckBoxTester(Browser, "FullTime");
            _hideContactDetailsCheckBox = new HtmlCheckBoxTester(Browser, "HideContactDetails");

            _previewButton = new HtmlButtonTester(Browser, "preview");
            _publishButton = new HtmlButtonTester(Browser, "publish");

            _newJobAdUrl = new ReadOnlyApplicationUrl(true, "~/employers/jobads/jobad");
        }
Пример #5
0
 public void TestCleanup()
 {
     StopSortHosts();
     StopSearchHosts();
     JobAdSortHost.Start();
     JobAdSearchHost.Start();
 }
Пример #6
0
 public static void AssemblyInitialize(TestContext context)
 {
     InitialiseContainer();
     TestApplicationContext.SetupApplications(WebSite.LinkMe);
     MemberSearchHost.Start();
     JobAdSearchHost.Start();
     JobAdSortHost.Start();
 }
 public void EmailJobSearchAlertsTaskTestsInitialize()
 {
     ServicePointManager.ServerCertificateValidationCallback = delegate { return(true); };
     Resolve <IDbConnectionFactory>().DeleteAllTestData();
     _emailServer.ClearEmails();
     JobAdSearchHost.ClearIndex();
     JobAdSortHost.ClearIndex();
 }
Пример #8
0
        public static void ClassInitialize(TestContext context)
        {
            Resolve <IDbConnectionFactory>().DeleteAllTestData();

            JobAdSearchHost.ClearIndex();
            JobAdSortHost.ClearIndex();

            _searchService = Resolve <IJobAdSearchService>();
        }
Пример #9
0
 protected override void FixtureSetUp()
 {
     base.FixtureSetUp();
     ApplicationContext.SetupApplications(WebSite.Api);
     MemberSearchHost.Start();
     JobAdSearchHost.Start();
     JobAdSortHost.Start();
     JobAdSentimentAnalysisHost.Start();
 }
Пример #10
0
        public void TestInitialize()
        {
            _unsubscribeButton = new HtmlButtonTester(Browser, "Unsubscribe");

            _settingsUrl  = new ReadOnlyApplicationUrl(true, "~/members/settings");
            _savedUrl     = new ReadOnlyApplicationUrl(true, "~/members/searches/saved");
            _baseJobUrl   = new ReadOnlyApplicationUrl(true, "~/jobs/");
            _contactUsUrl = new ReadOnlyApplicationUrl("~/faqs/setting-up-your-profile/09d11385-0213-4157-a5a9-1b2a74e6887e");

            JobAdSearchHost.ClearIndex();
        }
Пример #11
0
        private void Stop()
        {
            try
            {
                MemberSearchHost.Stop();
                JobAdSearchHost.Stop();
                JobAdSortHost.Stop();
                ResourceSearchHost.Stop();

                chkSynchroniseIndex.Enabled = true;
                chkRebuildIndex.Enabled     = true;
                btnStart.Enabled            = true;
                btnStop.Enabled             = false;
            }
            catch (Exception ex)
            {
                new ExceptionDialog(ex, "Exception").ShowDialog();
            }
        }
Пример #12
0
        private void MapProductionFeed(string file, bool saveParsedData)
        {
            if (saveParsedData)
            {
                JobAdSearchHost.Start();
                JobAdSortHost.Start();
            }

            const string postId            = "123456";
            var          jobPosterId       = new Guid("D12C0E2E-E464-491C-96D2-15D79F98E506");
            var          integrationUserId = _careerOneQuery.GetIntegratorUser().Id;

            var posts = GetJobFeed(file);
            IJobFeedMapper <Job> mapper = new JobAdMapper(_locationQuery, _industriesQuery, null);

            foreach (var post in posts)
            {
                var jobAd = new JobAd
                {
                    PosterId    = jobPosterId,
                    Integration =
                    {
                        IntegratorReferenceId = postId,
                        ExternalApplyUrl      = string.Format("http://jobview.careerone.com.au/GetJob.aspx?JobID={0}", postId),
                        IntegratorUserId      = integrationUserId,
                    },
                };
                mapper.ApplyPostData(post, jobAd);

                if (saveParsedData)
                {
                    _jobAdsCommand.CreateJobAd(jobAd);
                    _jobAdsCommand.OpenJobAd(jobAd);
                }
            }
        }
Пример #13
0
        private void MapProductionFeed(string file, bool saveParsedData)
        {
            if (saveParsedData)
            {
                JobAdSearchHost.Start();
                JobAdSortHost.Start();
            }

            const string postId            = "123456";
            var          jobPosterId       = CreateEmployer(0).Id;
            var          integrationUserId = _jxtQuery.GetIntegratorUser().Id;

            var posts = GetJobFeed(file);
            IJobFeedMapper <Job> mapper = new JobAdMapper(_locationQuery, _industriesQuery, null);

            foreach (var post in posts)
            {
                var jobAd = new JobAd
                {
                    PosterId    = jobPosterId,
                    Integration =
                    {
                        IntegratorReferenceId = postId,
                        ExternalApplyUrl      = post.ApplicationMethod.Value,
                        IntegratorUserId      = integrationUserId,
                    },
                };
                mapper.ApplyPostData(post, jobAd);

                if (saveParsedData)
                {
                    _jobAdsCommand.CreateJobAd(jobAd);
                    _jobAdsCommand.OpenJobAd(jobAd);
                }
            }
        }
Пример #14
0
 protected void ClearSearchIndexes()
 {
     MemberSearchHost.ClearIndex();
     JobAdSearchHost.ClearIndex();
     JobAdSortHost.ClearIndex();
 }
Пример #15
0
 public void CommunityTestsInitialize()
 {
     Resolve <IDbConnectionFactory>().DeleteAllTestData();
     JobAdSearchHost.ClearIndex();
 }
Пример #16
0
 public void WebServiceTestsInitialize()
 {
     JobAdSearchHost.ClearIndex();
     JobAdSortHost.ClearIndex();
 }
Пример #17
0
 public void ResultsTestsInitialize()
 {
     JobAdSearchHost.ClearIndex();
     JobAdSortHost.ClearIndex();
 }
Пример #18
0
 public void TestInitialize()
 {
     JobAdSearchHost.ClearIndex();
 }
Пример #19
0
 public static void AssemblyInitialize(TestContext context)
 {
     InitialiseContainer();
     JobAdSearchHost.Start();
     JobAdSortHost.Start();
 }
Пример #20
0
 public void TestInitialize()
 {
     JobAdSearchHost.Start();
     JobAdSortHost.Start();
     JobAdSentimentAnalysisHost.Start();
 }