public static TestProgramSet CreateTestSet( String testSetName )
{
Stream stream =
ProjectManager.Instance.GetType().Assembly.GetManifestResourceStream( Resources.FileStructure );
if (stream == null)
throw new Exception( "Failed to load the File Structure resources." );
var reader = new XmlTextReader( stream );
var document = new XmlDocument();
document.Load( reader );
XmlElement root = document.DocumentElement;
string testSetPath = GetTestSetPath();
testSetName = CleanTestSetName( testSetName );
String rootPathName = Path.Combine( testSetPath, testSetName );
var testSet = new TestProgramSet();
testSet._testSetName = testSetName;
if (!Directory.Exists( rootPathName ))
testSet._testSetDirectory = Directory.CreateDirectory( rootPathName );
else
testSet._testSetDirectory = new DirectoryInfo( rootPathName );
ProcessFolderNode( root, rootPathName );
return testSet;
}