public void Init() { _discoverer = new PowerShellTestDiscoverer(); _discoveryContext = new Mock <IDiscoveryContext>(); _sink = new Mock <ITestCaseDiscoverySink>(); _messageLogger = new Mock <IMessageLogger>(); }
public PowerShellTestExecutorTests() { discoverer = new PowerShellTestDiscoverer(logger.Object); executor = new PowerShellTestExecutor(logger.Object, () => new StopwatchTimer(), new SynchronousTaskScheduler()) { OutputDirectory = new DirectoryInfo(Directory.GetCurrentDirectory()) }; }
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(); } }
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); } }
public PowerShellTestDiscovererTests() { discoverer = new PowerShellTestDiscoverer(logger.Object); }