public void Test1() { var env = EnvManager.Generate("Hello"); Assert.Equal("Hello", env.Name); Assert.True(env.Enabled); }
public void Test1() { var env = EnvManager.Generate("Hello"); switcher.TurnOff(env); switcher.TurnOn(env); }
public void Test3() { var env = EnvManager.Generate("Hello"); Assert.Throws <ArgumentException>(() => { switcher.TurnOn(env); }); }
public void Test2() { var envName = "Hello"; Directory.CreateDirectory("Managed"); var stream = new EnvStream("Managed", envName); stream.WriteEnv(EnvManager.Generate(envName)); }
public void Test2() { var env = EnvManager.Generate("Hello"); env.Enabled = false; Assert.Throws <ArgumentException>(() => { switcher.TurnOff(env); }); }
public void Test2() { var env = EnvManager.Generate("Hello"); var settings = new ParallelEnvsSettings(); settings.EnvNames.Add(env.Name); EnvManager.AddFile(ref env, existsFilePath, settings); }
public void Test3() { var env = EnvManager.Generate("Hello"); var settings = new ParallelEnvsSettings(); settings.EnvNames.Add(env.Name); Assert.Throws <FileNotFoundException>(() => { EnvManager.AddFile(ref env, unknownFilePath, settings); }); }
public void Test3() { var envName = "Hello"; Directory.CreateDirectory("Managed"); var stream = new EnvStream("Managed", envName); var env = EnvManager.Generate(envName); stream.WriteEnv(env); var env_loaded = stream.LoadEnv(); Assert.Equal(env.Name, env_loaded.Name); Assert.True(env.Enabled == env_loaded.Enabled); Assert.Equal(env.Files, env_loaded.Files); }
public void Execute(List <string> args) { if (args.Count == 0) { Console.WriteLine(Description); return; } var envName = args[0]; var env = EnvManager.Generate(envName); Settings.EnvNames.Add(env.Name); Settings.SaveToFile(); var stream = new EnvStream(Settings.ApplicationWorkDirectoryPath, env.Name); stream.WriteEnv(env); Console.WriteLine("Created"); }