public void TestAmendJobWithRedirectionUrl() { var employer = CreateEmployer(); var postRequest = new PostAdvertRequestMessage { UserCredentials = new Credentials { Username = _jobG8Query.GetIntegratorUser().LoginId, Password = Password }, PostAdvert = CreatePostAdvert(employer, true), }; var response = PostAdvert(employer, postRequest); Assert.AreEqual("", response); AssertJobAd(employer.Id, "http://www.jobg8.com/Redirection.aspx?jbid=11&jid=11514&email=[[candidateemailaddress]]", "http://www.jobg8.com/WebServices/ApplicationResponse.asmx"); var amendRequest = new AmendAdvertRequestMessage { UserCredentials = new Credentials { Username = _jobG8Query.GetIntegratorUser().LoginId, Password = Password }, AmendAdvert = CreateAmendAdvert(employer), }; response = AmendAdvert(employer, amendRequest); Assert.AreEqual("", response); AssertJobAd(employer.Id, "http://www.jobg8.com/Redirection.aspx?jbid=11&jid=11514&email=[[candidateemailaddress]]", "http://www.jobg8.com/WebServices/ApplicationResponse.asmx"); }
public void TestAmendJob() { var employer = CreateEmployer(); var postRequest = new PostAdvertRequestMessage { UserCredentials = new Credentials { Username = _jobG8Query.GetIntegratorUser().LoginId, Password = Password }, PostAdvert = CreatePostAdvert(employer, false), }; var response = PostAdvert(employer, postRequest); Assert.AreEqual("", response); AssertJobAd(employer.Id, null, "http://www.jobg8.com/WebServices/ApplicationResponse.asmx"); var amendRequest = new AmendAdvertRequestMessage { UserCredentials = new Credentials { Username = _jobG8Query.GetIntegratorUser().LoginId, Password = Password }, AmendAdvert = CreateAmendAdvert(employer), }; response = AmendAdvert(employer, amendRequest); Assert.AreEqual("", response); AssertJobAd(employer.Id, null, "http://www.jobg8.com/WebServices/ApplicationResponse.asmx"); }
protected string AmendAdvert(Employer employer, AmendAdvertRequestMessage request) { IAdvertPostService service = new AdvertPostService(employer.GetLoginId(), _jobAdsCommand, _jobAdsQuery, _jobAdIntegrationQuery, _externalJobAdsCommand, _locationQuery, _industriesQuery, _employersQuery, _loginCredentialsQuery, _serviceAuthenticationManager, _jobAdIntegrationReportsCommand); return(service.AmendAdvert(request).AmendAdvertResponse.Success); }