public void Init()
        {
            _discoverer = new PowerShellTestDiscoverer();

            _discoveryContext = new Mock <IDiscoveryContext>();
            _sink             = new Mock <ITestCaseDiscoverySink>();
            _messageLogger    = new Mock <IMessageLogger>();
        }
コード例 #2
0
 public PowerShellTestExecutorTests()
 {
     discoverer = new PowerShellTestDiscoverer(logger.Object);
     executor   = new PowerShellTestExecutor(logger.Object, () => new StopwatchTimer(), new SynchronousTaskScheduler())
     {
         OutputDirectory = new DirectoryInfo(Directory.GetCurrentDirectory())
     };
 }
コード例 #3
0
        protected void LoadFromFolder(string path)
        {
            RootPath = path;
            TestProject testProject = PowerShellTestDiscoverer.GetFolderTests(path, null);

            if (testProject.ItemCount() > 0)
            {
                TestSolution solution = new TestSolution();
                solution.Projects.Add(testProject);
                Model.Merge(solution);
                CleartestFilesByPath();
                OnModelChanged();
            }
        }
コード例 #4
0
        public void RunTests(string filePath, int lineNumber)
        {
            TestFile testFile = GetTestFileByPath(filePath);
            TestFile newFile  = PowerShellTestDiscoverer.DiscoverTestFile(filePath);

            if (testFile == null)
            {
                testFile = newFile;
                AddTestFile(testFile);
            }
            else
            {
                testFile.Merge(newFile);
            }
            TestModel model = testFile.FindModelByLineNumber(lineNumber);

            if (model != null)
            {
                DoRunCommandAsync(model);
            }
        }
コード例 #5
0
 public PowerShellTestDiscovererTests()
 {
     discoverer = new PowerShellTestDiscoverer(logger.Object);
 }