コード例 #1
0
        private static TestProject LoadProject(string directoryName, TestProjectData testProjectData)
        {
            testProjectData.Validate(); // sanity check
            testProjectData.MakeAbsolutePaths(directoryName);

            var testProject = testProjectData.ToTestProject();
            return testProject;
        }
コード例 #2
0
        /// <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);
        }