public void DeleteOccupationProfile_FaultException2_ThrowsServiceValidationException() { mockJobMatchProfileService.Setup(m => m.Delete(It.IsAny <DeleteRequest>())).Throws(ValidationFaultException()); var service = SystemUnderTest(); var model = new DeleteOccupationProfileModel() { JobSeekerID = 1234567890, OccupationProfileID = 1234567890 }; service.DeleteOccupationProfile(model); }
public void DeleteOccupationProfile_Successful() { mockJobMatchProfileService.Setup(m => m.Delete(It.Is <DeleteRequest>(i => i.JobSeekerID == 1234567890 && i.JobMatchPreferenceID == 1234567890))) .Returns(new DeleteResponse() { ExecutionResult = SuccessResult() }); var service = SystemUnderTest(); var model = new DeleteOccupationProfileModel() { JobSeekerID = 1234567890, OccupationProfileID = 1234567890 }; service.DeleteOccupationProfile(model); mockJobMatchProfileService.Verify(m => m.Delete(It.Is <DeleteRequest>(i => i.JobSeekerID == 1234567890 && i.JobMatchPreferenceID == 1234567890)), Times.Once()); }