Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StackExchange.Redis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
StackExchange.Redis
Commits
78e430a6
Commit
78e430a6
authored
Mar 10, 2018
by
Nick Craver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NRedisSearch: don't throw for everyone who doesn't have the module
TODO: inherit from tests project and use a proper Skip.
parent
9dc6dd2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
ExampleUsage.cs
NRediSearch.Test/ExampleUsage.cs
+17
-1
No files found.
NRediSearch.Test/ExampleUsage.cs
View file @
78e430a6
...
...
@@ -36,7 +36,23 @@ public void BasicUsage()
.
AddTextField
(
"body"
,
1.0
)
.
AddNumericField
(
"price"
);
Assert
.
True
(
client
.
CreateIndex
(
sc
,
Client
.
IndexOptions
.
Default
));
bool
result
=
false
;
try
{
result
=
client
.
CreateIndex
(
sc
,
Client
.
IndexOptions
.
Default
);
}
catch
(
RedisServerException
ex
)
{
// TODO: Convert to Skip
if
(
ex
.
Message
==
"ERR unknown command 'FT.CREATE'"
)
{
Console
.
WriteLine
(
ex
.
Message
);
Console
.
WriteLine
(
"Module not installed, aborting"
);
return
;
// the module isn't installed
}
}
Assert
.
True
(
result
);
// note: using java API equivalent here; it would be nice to
// use meta-programming / reflection instead in .NET
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment