public void Constructor_ValueAsActiveConfiguredProject_SetsActiveConfiguredProjectProperty()
        {
            var threadingService                  = new Lazy <IProjectThreadingService>(() => IProjectThreadingServiceFactory.Create());
            var project                           = IUnconfiguredProjectFactory.Create();
            var projectProperties                 = ProjectPropertiesFactory.Create(project);
            var activeConfiguredProject           = IActiveConfiguredProjectFactory.ImplementValue(() => projectProperties.ConfiguredProject);
            var activeConfiguredProjectProperties = IActiveConfiguredProjectFactory.ImplementValue(() => projectProperties);

            var services = new UnconfiguredProjectCommonServices(project, threadingService, activeConfiguredProject, activeConfiguredProjectProperties);

            Assert.Same(projectProperties.ConfiguredProject, services.ActiveConfiguredProject);
        }
Esempio n. 2
0
        public void Constructor_ValueAsProjectAccessor_SetsProjectAccessorProperty()
        {
            var project                           = UnconfiguredProjectFactory.Create();
            var threadingService                  = new Lazy <IProjectThreadingService>(() => IProjectThreadingServiceFactory.Create());
            var projectProperties                 = ProjectPropertiesFactory.Create(project);
            var activeConfiguredProject           = ActiveConfiguredProjectFactory.ImplementValue(() => projectProperties.ConfiguredProject);
            var activeConfiguredProjectProperties = ActiveConfiguredProjectFactory.ImplementValue(() => projectProperties);
            var projectAccessor                   = new Lazy <IProjectAccessor>(() => IProjectAccessorFactory.Create());

            var services = new UnconfiguredProjectCommonServices(project, threadingService, activeConfiguredProject, activeConfiguredProjectProperties, projectAccessor);

            Assert.Same(projectAccessor.Value, services.ProjectAccessor);
        }
        public void Constructor_ValueAsThreadingService_SetsThreadingServiceProperty()
        {
            var project                           = UnconfiguredProjectFactory.Create();
            var projectTree                       = new Lazy <IPhysicalProjectTree>(() => IPhysicalProjectTreeFactory.Create());
            var threadingService                  = new Lazy <IProjectThreadingService>(() => IProjectThreadingServiceFactory.Create());
            var projectProperties                 = ProjectPropertiesFactory.Create(project);
            var activeConfiguredProject           = ActiveConfiguredProjectFactory.ImplementValue(() => projectProperties.ConfiguredProject);
            var activeConfiguredProjectProperties = ActiveConfiguredProjectFactory.ImplementValue(() => projectProperties);
            var projectLockService                = new Lazy <IProjectLockService>(() => IProjectLockServiceFactory.Create());

            var services = new UnconfiguredProjectCommonServices(project, projectTree, threadingService, activeConfiguredProject, activeConfiguredProjectProperties, projectLockService);

            Assert.Same(threadingService.Value, services.ThreadingService);
        }