diff --git a/src/abstractions/Helpers/EnumHelpers.cs b/src/abstractions/Helpers/EnumHelpers.cs index 20200505..86397558 100644 --- a/src/abstractions/Helpers/EnumHelpers.cs +++ b/src/abstractions/Helpers/EnumHelpers.cs @@ -177,7 +177,7 @@ private static bool TryGetFieldValueName(Type type, string rawValue, out string if(type.GetField(name)?.GetCustomAttribute() is { } attribute) return attribute.Value; - return name.ToFirstCharacterLowerCase(); + return name; } } } diff --git a/tests/serialization/form/FormSerializationWriterTests.cs b/tests/serialization/form/FormSerializationWriterTests.cs index 109410ab..ffc29db2 100644 --- a/tests/serialization/form/FormSerializationWriterTests.cs +++ b/tests/serialization/form/FormSerializationWriterTests.cs @@ -51,7 +51,7 @@ public void WritesSampleObjectValue() // Assert var expectedString = "id=48d31887-5fad-4d73-a9f5-3c356e68a038&" + - "numbers=one%2Ctwo&" + // serializes enums + "numbers=One%2CTwo&" + // serializes enums "workDuration=PT1H&" + // Serializes timespans "birthDay=2017-09-04&" + // Serializes dates "startWorkTime=08%3A00%3A00&" + //Serializes times @@ -432,7 +432,7 @@ public void WriteEnumValue_IsWrittenCorrectly() var serializedString = reader.ReadToEnd(); // Assert - Assert.Equal("prop1=sixteen", serializedString); + Assert.Equal("prop1=Sixteen", serializedString); } [Fact] @@ -468,6 +468,6 @@ public void WriteCollectionOfEnumValues_IsWrittenCorrectly() var serializedString = reader.ReadToEnd(); // Assert - Assert.Equal("prop1=sixteen%2Ctwo", serializedString); + Assert.Equal("prop1=Sixteen%2CTwo", serializedString); } } diff --git a/tests/serialization/json/JsonSerializationWriterTests.cs b/tests/serialization/json/JsonSerializationWriterTests.cs index d2362f34..d0ea10c2 100644 --- a/tests/serialization/json/JsonSerializationWriterTests.cs +++ b/tests/serialization/json/JsonSerializationWriterTests.cs @@ -157,7 +157,7 @@ public void WritesSampleCollectionOfObjectValues() // Assert var expectedString = "[{" + "\"id\":\"48d31887-5fad-4d73-a9f5-3c356e68a038\"," + - "\"numbers\":\"one,two\"," + + "\"numbers\":\"One,Two\"," + "\"testNamingEnum\":\"Item2:SubItem1\"," + "\"mobilePhone\":null," + "\"accountEnabled\":false," + @@ -206,7 +206,7 @@ public void WritesEnumValuesAsCamelCasedIfNotEscaped() // Assert var expectedString = "[{" + - "\"testNamingEnum\":\"item1\"" + // Camel Cased + "\"testNamingEnum\":\"Item1\"" + // Camel Cased "}]"; Assert.Equal(expectedString, serializedJsonString); } diff --git a/tests/serialization/text/TextSerializationWriterTests.cs b/tests/serialization/text/TextSerializationWriterTests.cs index b8038e2f..cfd170bf 100644 --- a/tests/serialization/text/TextSerializationWriterTests.cs +++ b/tests/serialization/text/TextSerializationWriterTests.cs @@ -350,7 +350,7 @@ public void WriteEnumValue_IsWrittenCorrectly() var serializedString = reader.ReadToEnd(); // Assert - Assert.Equal("firstItem", serializedString); + Assert.Equal("FirstItem", serializedString); }