diff --git a/src/Stateless/Reflection/InvocationInfo.cs b/src/Stateless/Reflection/InvocationInfo.cs index 9f0270fa..5cec4727 100644 --- a/src/Stateless/Reflection/InvocationInfo.cs +++ b/src/Stateless/Reflection/InvocationInfo.cs @@ -63,9 +63,11 @@ public string Description { if (_description != null) return _description; + if (MethodName == null) + return ""; if (MethodName.IndexOfAny(new char[] { '<', '>', '`' }) >= 0) return DefaultFunctionDescription; - return MethodName ?? ""; + return MethodName; } } diff --git a/test/Stateless.Tests/AsyncActionsFixture.cs b/test/Stateless.Tests/AsyncActionsFixture.cs index e74d3e76..397b5e4e 100644 --- a/test/Stateless.Tests/AsyncActionsFixture.cs +++ b/test/Stateless.Tests/AsyncActionsFixture.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using Xunit; +using System.Globalization; namespace Stateless.Tests { @@ -567,7 +568,8 @@ public async Task FireAsyncTriggerWithParametersArray() [Fact] public async Task FireAsync_TriggerWithMoreThanThreeParameters() { - const string expectedParam = "42-Stateless-True-420.69-Y"; + var decimalSeparator = CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator; + string expectedParam = $"42-Stateless-True-420{decimalSeparator}69-Y"; string actualParam = null; var sm = new StateMachine(State.A);