コード例 #1
0
            public async Task ClearsDonatedIntents()
            {
                doNotShowConfirmationDialog();
                await ViewModel.TryLogout();

                IntentDonationService.Received().ClearAll();
            }
コード例 #2
0
            public async Task ClearsDonatedIntents()
            {
                doNotShowConfirmationDialog();

                ViewModel.TryLogout.Execute();
                TestScheduler.Start();

                IntentDonationService.Received().ClearAll();
            }
コード例 #3
0
            public async ThreadingTask ShouldDonateStopTimerIntent()
            {
                var secondTimeEntry = Substitute.For <IThreadSafeTimeEntry>();

                await ViewModel.StopTimeEntryCommand.ExecuteAsync();

                subject.OnNext(secondTimeEntry);
                TestScheduler.AdvanceBy(TimeSpan.FromMilliseconds(50).Ticks);
                await ViewModel.StopTimeEntryCommand.ExecuteAsync();

                IntentDonationService.Received().DonateStopCurrentTimeEntry();
            }
コード例 #4
0
            public void ShouldDonateStopTimerIntent()
            {
                var secondTimeEntry = Substitute.For <IThreadSafeTimeEntry>();

                ViewModel.StopTimeEntry.Execute(Arg.Any <TimeEntryStopOrigin>());
                TestScheduler.Start();
                TestScheduler.Stop();
                subject.OnNext(secondTimeEntry);
                TestScheduler.AdvanceBy(TimeSpan.FromMilliseconds(50).Ticks);
                ViewModel.StopTimeEntry.Execute(Arg.Any <TimeEntryStopOrigin>());

                TestScheduler.Start();
                IntentDonationService.Received().DonateStopCurrentTimeEntry();
            }
コード例 #5
0
            public async Task DonatesTheIntent()
            {
                await CallInteractor(CreatePrototype(ValidTime, ValidDescription, true, ProjectId));

                IntentDonationService.Received().DonateStartTimeEntry(Arg.Any <IWorkspace>(), Arg.Any <ITimeEntry>());
            }
コード例 #6
0
        public async Task ClearsDonatedIntents()
        {
            await interactor.Execute();

            IntentDonationService.Received().ClearAll();
        }
コード例 #7
0
                public async void ShouldSetShortcutSuggestions()
                {
                    await ViewModel.Initialize();

                    IntentDonationService.Received().SetDefaultShortcutSuggestions(Arg.Any <IWorkspace>());
                }