Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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());
        }