1
0

Fixing Json.GetValue()

This commit is contained in:
2023-05-11 18:12:45 +02:00
parent cb133aea0c
commit d755754198
3 changed files with 26 additions and 5 deletions

View File

@@ -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!");