Skip to content

Commit

Permalink
fix: enumparser toLower() changed to toLowerInvariant()
Browse files Browse the repository at this point in the history
  • Loading branch information
Gokce Ozkan committed May 29, 2024
1 parent 86ecd53 commit c3b34ac
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion SiemensIXBlazor.Tests/SiemensIXBlazor.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
Expand All @@ -17,6 +17,7 @@
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="Moq" Version="4.20.70" />
<PackageReference Include="MSTest.TestAdapter" Version="3.3.1" />
<PackageReference Include="xunit" Version="2.8.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.0">
<PrivateAssets>all</PrivateAssets>
Expand Down
7 changes: 6 additions & 1 deletion SiemensIXBlazor/Helpers/EnumParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ namespace SiemensIXBlazor.Helpers
{
public static class EnumParser<TEnum> where TEnum : Enum
{
public static string ParseEnumToString(object enumValue) => Enum.GetName(typeof(TEnum), enumValue)!.ToLower();
public static string ParseEnumToString(object enumValue)
{
var enumName = Enum.GetName(typeof(TEnum), enumValue);
return enumName != null ? enumName.ToLowerInvariant() : string.Empty;
}

}
}
3 changes: 3 additions & 0 deletions SiemensIXBlazor/SiemensIXBlazor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@

<ItemGroup>
<PackageReference Include="BlazorComponentUtilities" Version="1.8.0" />
<PackageReference Include="bunit.web" Version="1.28.9" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.4" />
<PackageReference Include="MSTest.TestAdapter" Version="3.3.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.3.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

Expand Down

0 comments on commit c3b34ac

Please sign in to comment.