public void ErrorRequestHistoryIdCustomerNotInformed() { var query = new RequestHistoryQuery(0, _appSettings); var commandResult = new RequestQueryHandler(_mapper, _repo.Object) .Handle(query, new CancellationToken()).Result; Assert.True(commandResult.HasError(1009)); }
public void ErrorRequestHistoryNotFound() { IEnumerable <RequestHistory> requestHistories = new List <RequestHistory>(); _repo.Setup((s) => s.GetHistoryByIdCustomer(It.IsAny <int>())) .Returns(Task.FromResult(requestHistories)); var query = new RequestHistoryQuery(1, _appSettings); var commandResult = new RequestQueryHandler(_mapper, _repo.Object) .Handle(query, new CancellationToken()).Result; Assert.True(commandResult.HasError(2012)); }