コード例 #1
0
ファイル: EnvsTest.cs プロジェクト: ShohamWeiss/Ginger
        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);
        }
コード例 #2
0
ファイル: EnvsTest.cs プロジェクト: ShohamWeiss/Ginger
        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);
        }
コード例 #3
0
ファイル: EnvsTest.cs プロジェクト: ShohamWeiss/Ginger
        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);
        }
コード例 #4
0
ファイル: EnvsTest.cs プロジェクト: ShohamWeiss/Ginger
        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);
        }