public TestVm(string testPath, int id, ITestTreeNode parent) : base(parent, testPath) { _testFolder = parent as TestFolderVm; TestPath = testPath; TestSuite = _testFolder == null ? (TestSuiteVm)parent : _testFolder.TestSuite; if (_testFolder != null) { Statistics = null; FileStatistics = new FileStatistics( _testFolder.ParsingStatistics.ReplaceSingleSubtask(Name), _testFolder.ParseTreeStatistics.ReplaceSingleSubtask(Name), _testFolder.AstStatistics.ReplaceSingleSubtask(Name), _testFolder.DependPropsStatistics); _file = new TestFile(this, TestSuite.Language, id, _testFolder.Project, FileStatistics); } else { Statistics = new StatisticsTask.Container("Total"); FileStatistics = new FileStatistics( Statistics.ReplaceSingleSubtask("Parsing"), Statistics.ReplaceSingleSubtask("ParseTree"), Statistics.ReplaceSingleSubtask("Ast", "AST Creation"), Statistics.ReplaceContainerSubtask("DependProps", "Dependent properties")); var solution = new FsSolution <IAst>(); var project = new FsProject <IAst>(solution, Path.GetDirectoryName(testPath), TestSuite.Libs); _file = new TestFile(this, TestSuite.Language, id, project, FileStatistics); } if (TestSuite.TestState == TestState.Ignored) { TestState = TestState.Ignored; } }
protected FullPathVm([NotNull] ITestTreeNode parent, [NotNull] string fullPath) { if (parent == null) { throw new ArgumentNullException("parent"); } if (fullPath == null) { throw new ArgumentNullException("fullPath"); } Parent = parent; FullPath = fullPath; }