public void If_to_date_is_before_from_date_should_return_BadRequest() { Func <Task> action = async() => await _service.Get(Db, _poll.Id, _fromTime, _fromTime.AddHours(-3)); action.Should() .Throw <BadRequestException>() .WithMessage("*toTime*") .WithMessage("*fromTime*"); }