コード例 #1
0
        private static UnconfiguredProjectTasksService CreateInstance(IProjectAsynchronousTasksService?tasksService = null, ILoadedInHostListener?loadedInHostListener = null, ISolutionService?solutionService = null)
        {
            tasksService ??= IProjectAsynchronousTasksServiceFactory.Create();
            loadedInHostListener ??= ILoadedInHostListenerFactory.Create();
            solutionService ??= ISolutionServiceFactory.Create();

            return(new UnconfiguredProjectTasksService(tasksService, IProjectThreadingServiceFactory.Create(), loadedInHostListener, solutionService));
        }
コード例 #2
0
        public void SolutionLoadedInHost_SolutionServiceReturnsUncompletedTask_ReturnsUncompletedTask()
        {
            var solutionService = ISolutionServiceFactory.ImplementSolutionLoadedInHost(() => new Task(() => { }));

            var service = CreateInstance(solutionService: solutionService);

            var result = service.SolutionLoadedInHost;

            Assert.False(result.IsCompleted);
        }
コード例 #3
0
        public void SolutionLoadedInHost_SolutionServiceSolutionReturnsCompletedTask_ReturnsCompletedTask()
        {
            var solutionService = ISolutionServiceFactory.ImplementSolutionLoadedInHost(() => Task.CompletedTask);

            var service = CreateInstance(solutionService: solutionService);

            var result = service.SolutionLoadedInHost;

            Assert.True(result.Status == TaskStatus.RanToCompletion);
        }