public void Constructor_NullAsActiveConfguredProjectProperties_ThrowsArgumentNull() { var threadingService = new Lazy <IProjectThreadingService>(() => IProjectThreadingServiceFactory.Create()); var project = IUnconfiguredProjectFactory.Create(); var projectProperties = ProjectPropertiesFactory.Create(project); var activeConfiguredProject = IActiveConfiguredProjectFactory.ImplementValue(() => projectProperties.ConfiguredProject); Assert.Throws <ArgumentNullException>("activeConfiguredProjectProperties", () => { new UnconfiguredProjectCommonServices(project, threadingService, activeConfiguredProject, (ActiveConfiguredProject <ProjectProperties>)null); }); }
public void Constructor_NullAsThreadingService_ThrowsArgumentNull() { var project = IUnconfiguredProjectFactory.Create(); var projectProperties = ProjectPropertiesFactory.Create(project); var activeConfiguredProject = IActiveConfiguredProjectFactory.ImplementValue(() => projectProperties.ConfiguredProject); var activeConfiguredProjectProperties = IActiveConfiguredProjectFactory.ImplementValue(() => projectProperties); Assert.Throws <ArgumentNullException>("threadingService", () => { new UnconfiguredProjectCommonServices(project, (Lazy <IProjectThreadingService>)null, activeConfiguredProject, activeConfiguredProjectProperties); }); }
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); }
public void Constructor_NullAsProjectLockService_ThrowsArgumentNull() { var project = IUnconfiguredProjectFactory.Create(); var projectTree = new Lazy <IPhysicalProjectTree>(() => IPhysicalProjectTreeFactory.Create()); var threadingService = new Lazy <IProjectThreadingService>(() => IProjectThreadingServiceFactory.Create()); var projectProperties = ProjectPropertiesFactory.Create(project); var activeConfiguredProject = IActiveConfiguredProjectFactory.ImplementValue(() => projectProperties.ConfiguredProject); var activeConfiguredProjectProperties = IActiveConfiguredProjectFactory.ImplementValue(() => projectProperties); Assert.Throws <ArgumentNullException>("projectLockService", () => { new UnconfiguredProjectCommonServices(project, projectTree, threadingService, activeConfiguredProject, activeConfiguredProjectProperties, null); }); }
public void Constructor_ValueAsThreadingService_SetsThreadingServiceProperty() { var project = IUnconfiguredProjectFactory.Create(); var projectTree = new Lazy <IPhysicalProjectTree>(() => IPhysicalProjectTreeFactory.Create()); var threadingService = new Lazy <IProjectThreadingService>(() => IProjectThreadingServiceFactory.Create()); var projectProperties = ProjectPropertiesFactory.Create(project); var activeConfiguredProject = IActiveConfiguredProjectFactory.ImplementValue(() => projectProperties.ConfiguredProject); var activeConfiguredProjectProperties = IActiveConfiguredProjectFactory.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); }
private MyProjectFolderProjectTreePropertiesProvider CreateInstance(IProjectImageProvider imageProvider, IProjectDesignerService designerService, string appDesignerFolder = "My Project") { designerService = designerService ?? IProjectDesignerServiceFactory.Create(); var threadingService = IProjectThreadingServiceFactory.Create(); var project = IUnconfiguredProjectFactory.Create(); var projectProperties = ProjectPropertiesFactory.Create(project, new PropertyPageData() { Category = nameof(ConfigurationGeneral), PropertyName = nameof(ConfigurationGeneral.AppDesignerFolder), Value = appDesignerFolder }); var projectServices = IUnconfiguredProjectCommonServicesFactory.Create(project, threadingService, projectProperties.ConfiguredProject, projectProperties); return(new MyProjectFolderProjectTreePropertiesProvider(imageProvider ?? IProjectImageProviderFactory.Create(), projectServices, designerService)); }
public static ProjectProperties CreateEmpty() { return(Create(IUnconfiguredProjectFactory.Create())); }