diff --git a/tests/Prism.Core.Tests/Commands/AsyncDelegateCommandFixture.cs b/tests/Prism.Core.Tests/Commands/AsyncDelegateCommandFixture.cs index 99cda221a3..ff1ef506f8 100644 --- a/tests/Prism.Core.Tests/Commands/AsyncDelegateCommandFixture.cs +++ b/tests/Prism.Core.Tests/Commands/AsyncDelegateCommandFixture.cs @@ -132,4 +132,14 @@ public async Task ICommandExecute_UsesDefaultTokenSourceFactory() Assert.False(command.IsExecuting); } + + [Fact] + public void ICommandExecute_HandlesErrorOnce() + { + var handled = 0; + ICommand command = new AsyncDelegateCommand(str => throw new System.Exception("Test")) + .Catch(ex => handled++); + command.Execute(string.Empty); + Assert.Equal(1, handled); + } }