示例#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();
            }
            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();
            }
            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();
        }
                public async void ShouldSetShortcutSuggestions()
                {
                    await ViewModel.Initialize();

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