Пример #1
0
        public void Handle_InvalidJobOfferRequirementId_ThrowsNotFoundException()
        {
            //Arrange
            var handler = new GetJobOfferRequirementListQueryHandler(_mapper, _mockJobOfferRepository.Object, _mockLogger.Object);

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

            //Assert
            func.ShouldThrowAsync <NotFoundException>();
        }
Пример #2
0
        public async Task Handle_GetJobOfferRequirementList_ReturnsSpecificType()
        {
            //Arrange
            var handler = new GetJobOfferRequirementListQueryHandler(_mapper, _mockJobOfferRepository.Object, _mockLogger.Object);

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

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