public void GetPollByIdNotFound() { var command = new GetByIdQueryHandler(_pollRepositorioMock.Object); var result = command.Handle(new GetByIdQuery(2), new CancellationToken()).Result; Assert.AreEqual(0, result.Poll_id); Assert.AreEqual(null, result.Poll_description); }
public void GetPollByIdSuccessAsync() { var command = new GetByIdQueryHandler(_pollRepositorioMock.Object); var result = command.Handle(new GetByIdQuery(1), new CancellationToken()).Result; Assert.NotNull(result); Assert.AreNotEqual(0, result.Poll_id); Assert.AreEqual(_pollMock.FirstOrDefault().PollDescription, result.Poll_description); }