-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Asked for in #831 and low overhead so why not! I didn't do `RedisChannel` since it already has a constructor available. Tests added to ensure these are used in a way we don't break them.
- Loading branch information
1 parent
eef7b8d
commit 659d514
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using Xunit; | ||
using Xunit.Abstractions; | ||
|
||
namespace StackExchange.Redis.Tests | ||
{ | ||
public class FSharpCompat : TestBase | ||
{ | ||
public FSharpCompat(ITestOutputHelper output) : base (output) { } | ||
|
||
[Fact] | ||
public void RedisKeyConstructor() | ||
{ | ||
Assert.Equal(default, new RedisKey()); | ||
Assert.Equal((RedisKey)"MyKey", new RedisKey("MyKey")); | ||
Assert.Equal((RedisKey)"MyKey2", new RedisKey(null, "MyKey2")); | ||
} | ||
|
||
[Fact] | ||
public void RedisValueConstructor() | ||
{ | ||
Assert.Equal(default, new RedisValue()); | ||
Assert.Equal((RedisValue)"MyKey", new RedisValue("MyKey")); | ||
Assert.Equal((RedisValue)"MyKey2", new RedisValue("MyKey2", 0)); | ||
} | ||
} | ||
} |