/// <inheritdoc />
        public TestProject NewProject(string projectName)
        {
            if (string.IsNullOrEmpty(projectName))
                throw new ArgumentException("projectName");

            var testProjectData = new TestProjectData();
            return LoadProject(System.IO.Path.GetDirectoryName(projectName), testProjectData);
        }
        private static TestProject LoadProject(string directoryName, TestProjectData testProjectData)
        {
            testProjectData.Validate(); // sanity check
            testProjectData.MakeAbsolutePaths(directoryName);

            var testProject = testProjectData.ToTestProject();
            return testProject;
        }
        /// <inheritdoc />
        public void SaveProject(TestProject testProject, FileInfo testProjectFile)
        {
            if (testProject == null)
                throw new ArgumentNullException("testProject");
            if (testProjectFile == null)
                throw new ArgumentNullException("testProjectFile");

            var testProjectData = new TestProjectData(testProject);
            testProjectData.Validate(); // sanity check
            testProjectData.MakeRelativePaths(testProjectFile.DirectoryName);
            xmlSerializer.SaveToXml(testProjectData, testProjectFile.FullName);
        }