forked from IdentityStream/Hangfire.Console
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix unit tests, add test for json serialization in JobProgressDispatcher
- Loading branch information
1 parent
30c8db2
commit 08f0e8c
Showing
3 changed files
with
30 additions
and
5 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
25 changes: 25 additions & 0 deletions
25
tests/Hangfire.Console.Tests/Dashboard/JobProgressDispatcherFacts.cs
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,25 @@ | ||
using System.Collections.Generic; | ||
using Hangfire.Console.Dashboard; | ||
using Newtonsoft.Json; | ||
using Xunit; | ||
|
||
namespace Hangfire.Console.Tests.Dashboard | ||
{ | ||
public class JobProgressDispatcherFacts | ||
{ | ||
[Fact] | ||
public void JsonSettings_PreservesDictionaryKeyCase() | ||
{ | ||
var result = new Dictionary<string, double> | ||
{ | ||
["AAA"] = 1.0, | ||
["Bbb"] = 2.0, | ||
["ccc"] = 3.0 | ||
}; | ||
|
||
var json = JsonConvert.SerializeObject(result, JobProgressDispatcher.JsonSettings); | ||
|
||
Assert.Equal("{\"AAA\":1.0,\"Bbb\":2.0,\"ccc\":3.0}", json); | ||
} | ||
} | ||
} |
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