-
Notifications
You must be signed in to change notification settings - Fork 82
Added error handling and empty array check #255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
To fix issue #208
This contains fix for issue #256 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @zulander1 thanks for opening this, couple things:
- Use
Enviornment.Newline
rather than carriage returns - Add a test in SearchTest.cs - something like this should suffice:
[Fact]
public void TestNullResponseDoc()
{
int? nullVal = null;
var nullResult = RedisResult.Create(nullVal);
var res = new RedisReply[] { 1, $"foo:{Ulid.NewUlid()}", new (nullResult) };
var query = new RedisQuery("fake-idx");
_mock.Setup(x => x.Execute(It.IsAny<string>(), It.IsAny<string[]>()))
.Returns(res);
var result = _mock.Object.Search<Person>(query);
}
Co-authored-by: Steve Lorello <[email protected]>
Co-authored-by: Steve Lorello <[email protected]>
Done, applied the correctoins |
@slorello89 , I am not sure why the building is failing on test Redis.OM.Unit.Tests.RediSearchTests.SearchFunctionalTests.TestSave, working on my local, can you help ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 - issue with the tests were related to another PR and how that interacted with the search tests.
This would improve issue for #253