public async Task TestCommandSubscription() { var testScheduler = new TestScheduler(); using (var busyStatusMonitor = new BusyStatusMonitor(testScheduler)) { Assert.False(busyStatusMonitor.IsBusy); var command = ReactiveCommand.Create(() => { }, null, Scheduler.Immediate); busyStatusMonitor.AddCommand(command, "command"); var list = new List <bool>(); using (busyStatusMonitor.Subscribe(x => list.Add(x))) { await command.Execute(); testScheduler.AdvanceBy(2); Assert.Equal(true, list.Last()); testScheduler.AdvanceBy(1); Assert.Equal(false, list.Last()); } } }