public static ScenarioDirectory Create(string scenario)
        {
            var name = Path.Combine(rootDirectory, scenario);

            FileSystem.EnsureDirectoryDeleted(name);
            FileSystem.EnsureDirectoryCreated(name);
            return(new ScenarioDirectory(name));
        }
Beispiel #2
0
        private ScriptFile(string scenario, bool createWorkingDirectory)
        {
            File.Delete(this.path = Path.Combine(directory, this.name = string.Concat(scenario, ".csx")));
            File.Delete(this.log  = Path.Combine(directory, string.Concat(scenario, ".log")));

            if (createWorkingDirectory)
            {
                FileSystem.EnsureDirectoryDeleted(Path.Combine(directory, scenario));
                FileSystem.EnsureDirectoryCreated(Path.Combine(directory, scenario));
            }
        }
        public static ScenarioDirectory Create(string scenario)
        {
            var name = Path.Combine(rootDirectory, scenario);

            if (name == null)
            {
                throw new Exception("Invalid directory");
            }
            Debug.WriteLine($"Scenarios Dir [{name.Length}]: {name}");
            FileSystem.EnsureDirectoryDeleted(name);
            FileSystem.EnsureDirectoryCreated(name);
            return(new ScenarioDirectory(name));
        }