Cancellation_should_occur_when_the_start_command_CancellationToken_is_signalled_on_the_next_timer_tick() { var command = new FakeAsyncCommand(FakeAsyncCommandBehavior.ExecuteWaitsForCancel); var timer = new FakeDispatcherTimer(); var vm = new LongRunningProcessProgressViewModel(command, timer); using var cancellationTokenSource = new CancellationTokenSource(); var task = vm.StartCommand.ExecuteAsync(cancellationToken: cancellationTokenSource.Token); cancellationTokenSource.Cancel(); await timer.RaiseTickEventAsync(); await task; command.WasCancelled.Should().BeTrue(); }