Example #1
0
        public void Handle_InvalidJobOfferRequirementId_ThrowsNotFoundException()
        {
            //Arrange
            var handler = new GetJobOfferSkillDetailQueryHandler(_mockJobOfferSkillRepository.Object, _mapper, _mockLogger.Object);

            //Act
            Func <Task> func = () => handler.Handle(new GetJobOfferSkillDetailQuery()
            {
                Id = "99"
            }, CancellationToken.None);

            //Assert
            func.ShouldThrowAsync <NotFoundException>();
        }
Example #2
0
        public async Task Handle_GetJobOfferRequirementDetail_ReturnsSpecificType()
        {
            //Arrange
            var handler = new GetJobOfferSkillDetailQueryHandler(_mockJobOfferSkillRepository.Object, _mapper, _mockLogger.Object);

            //Act
            var result = await handler.Handle(new GetJobOfferSkillDetailQuery()
            {
                Id = "1"
            }, CancellationToken.None);

            //Assert
            result.ShouldBeOfType <JobOfferSkillDetailViewModel>();
        }