public void Handle_InvalidJobOfferSkillId_ThrowsNotFoundException() { //Arrange var handler = new UpdateJobOfferSkillCommandHandler(_mapper, _mockLogger.Object, _mockJobOfferSkillRepository.Object); var command = new UpdateJobOfferSkillCommand() { Id = "99" }; //Act Func <Task> func = () => handler.Handle(command, CancellationToken.None); //Assert func.ShouldThrowAsync <NotFoundException>(); }
public async Task Handle_ValidJobOfferSkill_ReturnsSpecyficType() { //Arrange var handler = new UpdateJobOfferSkillCommandHandler(_mapper, _mockLogger.Object, _mockJobOfferSkillRepository.Object); var command = new UpdateJobOfferSkillCommand() { Id = "1", Content = "Test" }; //Act var result = await handler.Handle(command, CancellationToken.None); //Assert result.ShouldBeOfType <Unit>(); }