Fixing Json.GetValue()
This commit is contained in:
@@ -260,7 +260,7 @@ namespace UnitTests.Common.Extensions
|
||||
// act
|
||||
string topLevelString = jObj.GetValue<string>("stringValue");
|
||||
decimal topLevelDecimal = jObj.GetValue<decimal>("decimalValue");
|
||||
int subLevelInteger = jObj.GetValue<int>("object:integerValue");
|
||||
int subLevelInteger = jObj.GetValue<int>("object:IntegerValue");
|
||||
string subLevelString = jObj.GetValue<string>("object:stringValue");
|
||||
|
||||
string notExistingOnTopLevel = jObj.GetValue<string>("fancyValue");
|
||||
@@ -288,7 +288,7 @@ namespace UnitTests.Common.Extensions
|
||||
// act
|
||||
string topLevelString = jObj.GetValue("stringValue", "Test String");
|
||||
decimal topLevelDecimal = jObj.GetValue("decimalValue", 13.24m);
|
||||
int subLevelInteger = jObj.GetValue("object:integerValue", 55);
|
||||
int subLevelInteger = jObj.GetValue("object:IntegerValue", 55);
|
||||
string subLevelString = jObj.GetValue("object:stringValue", "Yeah!");
|
||||
|
||||
string notExistingOnTopLevel = jObj.GetValue("fancyValue", "Party!");
|
||||
|
||||
Reference in New Issue
Block a user