Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new <see cref="PowerShellTestContainer"/>.
        /// </summary>
        /// <param name="containerDiscoverer">The associated discoverer</param>
        /// <param name="scriptPath">A string representing the container source, ie. a file path</param>
        /// <param name="project">A source's parent project</param>
        /// <param name="debugEngines">Any debugging engines</param>
        public PowerShellTestContainer(ITestContainerDiscoverer containerDiscoverer, string scriptPath, IVsProject project, IEnumerable <Guid> debugEngines)
        {
            _containerDiscoverer = ValidateArg.NotNull(containerDiscoverer, "containerDiscoverer");;
            _scriptPath          = ValidateArg.NotNull(scriptPath, "scriptPath");
            Project = ValidateArg.NotNull(project, "project");

            _projectFile    = project.Info().File;
            TargetFramework = FrameworkVersion.None;
            TargetPlatform  = Architecture.AnyCPU;
            DebugEngines    = debugEngines;

            _timestamp = GetTimestamp();
        }
Ejemplo n.º 2
0
        private IEnumerable <IVSTestContainer> DiscoverTestContainers(IVsProject project)
        {
            var files = project.Info().GetProjectItems().Where(IsScriptFile);

            return(files.Select(file => _containerFactory(this, file, project)));
        }