public void VerifyEnvsShowinTree() { //Arrange EnvironmentsPOM EnvsPOM = mGingerAutomator.MainWindowPOM.GotoEnvironments(); //Act ProjEnvironment env1 = EnvsPOM.SelectEnvironment("Default"); EnvsPOM.SelectEnvironment("UAT"); EnvsPOM.SelectEnvironment("ST"); // assert Assert.AreEqual("Default", env1.Name); }
public void AddEnvUsingWizard() { //Arrange EnvironmentsPOM EnvsPOM = mGingerAutomator.MainWindowPOM.GotoEnvironments(); //Act EnvsPOM.CreateEnvironment("bbb"); EnvsPOM.SelectEnvironment("bbb"); ProjEnvironment bbbEnv = (from x in amdocs.ginger.GingerCoreNET.WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <ProjEnvironment>() where x.Name == "bbb" select x).SingleOrDefault(); // assert Assert.AreEqual("bbb", bbbEnv.Name); }
public void ChangeEnvNameOnDiskUpdateObjandShowinTree() { //Arrange string EnvName = "Env to rename"; string EnvNewName = "Env to rename ZZZ"; EnvironmentsPOM EnvsPOM = mGingerAutomator.MainWindowPOM.GotoEnvironments(); EnvsPOM.CreateEnvironment(EnvName); ProjEnvironment env = EnvsPOM.SelectEnvironment(EnvName); //Act string txt = File.ReadAllText(env.FilePath); txt = txt.Replace(EnvName, EnvNewName); File.WriteAllText(env.FilePath, txt); bool b = EnvsPOM.EnvironmentsTree.IsItemExist(EnvNewName); // assert Assert.AreEqual(EnvNewName, env.Name); Assert.IsTrue(b); }
public void AddEnvToFileSystemWillShowinEnvsTree() { // Arrange EnvironmentsPOM EnvsPOM = mGingerAutomator.MainWindowPOM.GotoEnvironments(); // Act // Create env on disk ProjEnvironment e1 = new ProjEnvironment() { Name = "aaa" }; string txt = e1.RepositorySerializer.SerializeToString(e1); string fileName = Path.Combine(SolutionFolder, @"Environments\aaa.Ginger.Environment.xml"); File.WriteAllText(fileName, txt); // Verify it show in treeview - FileWatcher should detect the new file on disk ProjEnvironment aaa = EnvsPOM.SelectEnvironment("aaa"); //Assert Assert.AreEqual("aaa", aaa.Name); }