Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 1661c61

Browse files
committed
Update deprecated usage
1 parent 4fd136c commit 1661c61

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

tests/ServiceStack.Text.Tests/DictionaryTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ public void Can_serialize_string_string_Dictionary_with_UTF8()
529529
public void Can_Deserialize_Object_To_Dictionary()
530530
{
531531
const string json = "{\"Id\":1}";
532-
var d = json.To<Dictionary<string, string>>();
532+
var d = json.ConvertTo<Dictionary<string, string>>();
533533
Assert.That(d.ContainsKey("Id"));
534534
Assert.That(d["Id"], Is.EqualTo("1"));
535535
}

tests/ServiceStack.Text.Tests/EnumTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public void Can_serialize_different_enum_styles()
152152
Assert.That("DoubleWord".FromJson<EnumStyles>(), Is.EqualTo(EnumStyles.DoubleWord));
153153
Assert.That("Underscore_Words".FromJson<EnumStyles>(), Is.EqualTo(EnumStyles.Underscore_Words));
154154

155-
using (JsConfig.With(new Config { EmitLowercaseUnderscoreNames = true}))
155+
using (JsConfig.With(new Config { TextCase = TextCase.SnakeCase }))
156156
{
157157
Assert.That("Double_Word".FromJson<EnumStyles>(), Is.EqualTo(EnumStyles.DoubleWord));
158158
Assert.That("Underscore_Words".FromJson<EnumStyles>(), Is.EqualTo(EnumStyles.Underscore_Words));

tests/ServiceStack.Text.Tests/ExpandoTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public void Can_Deserialize_Object_To_ExpandoObject()
176176
{
177177
JsConfig.TryToParsePrimitiveTypeValues = true;
178178
const string json = "{\"Id\":1}";
179-
dynamic d = json.To<ExpandoObject>();
179+
dynamic d = json.ConvertTo<ExpandoObject>();
180180
Assert.That(d.Id, Is.Not.Null);
181181
Assert.That(d.Id, Is.EqualTo(1));
182182
}

tests/ServiceStack.Text.Tests/JsConfigTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public class JsConfigCreateTests
210210
public void Does_create_scope_from_string()
211211
{
212212
var scope = JsConfig.CreateScope("emitlowercaseunderscorenames,IncludeNullValues:false,ExcludeDefaultValues:0,IncludeDefaultEnums:1");
213-
Assert.That(scope.EmitLowercaseUnderscoreNames);
213+
Assert.That(scope.TextCase, Is.EqualTo(TextCase.SnakeCase));
214214
Assert.That(!scope.IncludeNullValues);
215215
Assert.That(!scope.ExcludeDefaultValues);
216216
Assert.That(scope.IncludeDefaultEnums);
@@ -228,7 +228,7 @@ public void Does_create_scope_from_string()
228228
public void Does_create_scope_from_string_using_CamelCaseHumps()
229229
{
230230
var scope = JsConfig.CreateScope("eccn,inv:false,edv:0,ide:1");
231-
Assert.That(scope.EmitCamelCaseNames);
231+
Assert.That(scope.TextCase, Is.EqualTo(TextCase.CamelCase));
232232
Assert.That(!scope.IncludeNullValues);
233233
Assert.That(!scope.ExcludeDefaultValues);
234234
Assert.That(scope.IncludeDefaultEnums);

0 commit comments

Comments
 (0)