Esempio n. 1
0
        private void InitControls()
        {
            //TODO: uncomments once we have BusinessFlowsFolderTreeItem which get RF
            //RepositoryFolder<BusinessFlow> RF1 = mSolutionRepository.GetRepositoryItemRootFolder<BusinessFlow>();
            //BusinessFlowsFolderTreeItem t = new BusinessFlowsFolderTreeItem(RF1);
            //TVFrame.SetContent(new TreeViewExplorerPage(t));

            RepositoryFolder <BusinessFlow> RF2 = mSolutionRepository.GetRepositoryItemRootFolder <BusinessFlow>();
            ObservableList <BusinessFlow>   BFs = RF2.GetFolderItems();

            Grid1.ItemsSource = BFs;

            RepositoryFolder <BusinessFlow> RF3  = mSolutionRepository.GetRepositoryItemRootFolder <BusinessFlow>();
            ObservableList <BusinessFlow>   BFs2 = RF3.GetFolderItems();

            Grid2.ItemsSource = BFs2;

            // EnvsComboBox.in
            EnvsListBox.ItemsSource       = mSolutionRepository.GetAllRepositoryItems <ProjEnvironment>();
            EnvsListBox.DisplayMemberPath = nameof(ProjEnvironment.Name);

            EnvsComboBox.ItemsSource       = mSolutionRepository.GetAllRepositoryItems <ProjEnvironment>();
            EnvsComboBox.DisplayMemberPath = nameof(ProjEnvironment.Name);

            // Go get first env Guid
            Guid            guid = mSolutionRepository.GetAllRepositoryItems <ProjEnvironment>()[0].Guid;
            ProjEnvironment env1 = mSolutionRepository.GetRepositoryItemByGuid <ProjEnvironment>(guid);

            EnvNameTextBox.BindControl(env1, nameof(ProjEnvironment.Name));

            AllBFsListBox.ItemsSource       = mSolutionRepository.GetAllRepositoryItems <BusinessFlow>();
            AllBFsListBox.DisplayMemberPath = nameof(BusinessFlow.Name);
        }
Esempio n. 2
0
 public void CloseAllRunningAgents()
 {
     if (SolutionRepository != null)
     {
         List <Agent> runningAgents = SolutionRepository.GetAllRepositoryItems <Agent>().Where(x => x.Status == Agent.eStatus.Running).ToList();
         if (runningAgents != null && runningAgents.Count > 0)
         {
             foreach (Agent agent in runningAgents)
             {
                 try
                 {
                     agent.Close();
                 }
                 catch (Exception ex)
                 {
                     if (agent.Name != null)
                     {
                         Reporter.ToLog(eLogLevel.ERROR, string.Format("Failed to Close the '{0}' Agent", agent.Name), ex);
                     }
                     else
                     {
                         Reporter.ToLog(eLogLevel.ERROR, "Failed to Close the Agent", ex);
                     }
                 }
                 agent.IsFailedToStart = false;
             }
         }
     }
 }
Esempio n. 3
0
        public void RunsetConfigBFVariablesTest()
        {
            //Arrange
            ObservableList <BusinessFlow> bfList = SR.GetAllRepositoryItems <BusinessFlow>();
            BusinessFlow BF1 = bfList[0];

            ObservableList <Activity> activityList = BF1.Activities;

            Activity activity = activityList[0];

            ActDummy act1 = new ActDummy()
            {
                Value = "", Active = true
            };

            activity.Acts.Add(act1);

            VariableString v1 = new VariableString()
            {
                Name = "v1", InitialStringValue = "aaa"
            };

            BF1.AddVariable(v1);

            BF1.Active = true;

            mGR.BusinessFlows.Add(BF1);

            //Adding Same Business Flow Again to GingerRunner
            BusinessFlow bfToAdd = (BusinessFlow)BF1.CreateCopy(false);

            bfToAdd.ContainingFolder = BF1.ContainingFolder;
            bfToAdd.Active           = true;
            bfToAdd.Reset();
            bfToAdd.InstanceGuid = Guid.NewGuid();
            mGR.BusinessFlows.Add(bfToAdd);

            WorkSpace.Instance.SolutionRepository = SR;

            //Act
            //Changing initial value of 2nd BF from BusinessFlow Config
            mGR.BusinessFlows[2].Variables[2].Value = "bbb";
            mGR.BusinessFlows[2].Variables[2].DiffrentFromOrigin = true;

            mGR.RunRunner();

            //Assert
            Assert.AreEqual(BF1.RunStatus, eRunStatus.Passed);
            Assert.AreEqual(activity.Status, eRunStatus.Passed);

            Assert.AreEqual(bfToAdd.RunStatus, eRunStatus.Passed);

            Assert.AreEqual(mGR.BusinessFlows[1].Variables[2].Value, "aaa");
            Assert.AreEqual(mGR.BusinessFlows[2].Variables[2].Value, "bbb");
        }
Esempio n. 4
0
        private void PrepareForCLICreationAndExecution()
        {
            WorkSpace.Instance.OpenSolution(mSolutionFolder);
            SolutionRepository SR             = WorkSpace.Instance.SolutionRepository;
            RunsetExecutor     runsetExecutor = new RunsetExecutor();

            runsetExecutor.RunsetExecutionEnvironment = (from x in SR.GetAllRepositoryItems <ProjEnvironment>() where x.Name == "Default" select x).SingleOrDefault();
            runsetExecutor.RunSetConfig       = (from x in SR.GetAllRepositoryItems <RunSetConfig>() where x.Name == "Default Run Set" select x).SingleOrDefault();
            WorkSpace.Instance.RunsetExecutor = runsetExecutor;
            WorkSpace.Instance.RunsetExecutor.InitRunners();
        }
Esempio n. 5
0
        private void GetAllBFsandSave()
        {
            ObservableList <BusinessFlow> BFs = mSolutionRepository.GetAllRepositoryItems <BusinessFlow>();

            foreach (BusinessFlow BF in BFs)
            {
                ObservableList <Activity> activities = BF.Activities; // force it to parse the activities objects
                int i = activities.Count;
                WorkSpace.Instance.SolutionRepository.SaveRepositoryItem(BF);
            }
            Log("Done");
        }
        public void zz()
        {
            //Arrange
            int t1Count = 0;


            //Act

            ObservableList <MyRepositoryItem> allMRIs = mSolutionRepository.GetAllRepositoryItems <MyRepositoryItem>();

            t1Count = allMRIs.Count;
        }
        public async void OpenRunSet(string runSetName, string envName)
        {
            SolutionRepository SR           = WorkSpace.Instance.SolutionRepository;
            var             envs            = SR.GetAllRepositoryItems <ProjEnvironment>();
            ProjEnvironment projEnvironment = (from x in SR.GetAllRepositoryItems <ProjEnvironment>() where x.Name == envName select x).SingleOrDefault();
            RunSetConfig    runSetConfig    = (from x in SR.GetAllRepositoryItems <RunSetConfig>() where x.Name == runSetName select x).SingleOrDefault();
            RunsetExecutor  runsetExecutor  = new RunsetExecutor();

            WorkSpace.Instance.RunsetExecutor         = runsetExecutor;
            runsetExecutor.RunSetConfig               = runSetConfig;
            runsetExecutor.RunsetExecutionEnvironment = projEnvironment;
            runsetExecutor.InitRunners();
            await runsetExecutor.RunRunset();
        }
Esempio n. 8
0
        public void JsonOperationTest()
        {
            //Arrange
            ObservableList <BusinessFlow> bfList = SR.GetAllRepositoryItems <BusinessFlow>();
            BusinessFlow BF1 = bfList[0];
            ObservableList <Activity> activityList = BF1.Activities;

            BF1.Active = true;
            GingerExecutionEngine mGRForRunset = new GingerExecutionEngine(new GingerRunner());

            mGRForRunset.GingerRunner.Name = "Test Runner";
            Agent a = new Agent();

            a.DriverType = Agent.eDriverType.SeleniumChrome;
            mGRForRunset.SolutionAgents = new ObservableList <Agent>();
            mGRForRunset.SolutionAgents.Add(a);
            mGRForRunset.GingerRunner.ApplicationAgents.Add(new ApplicationAgent()
            {
                AppName = "SCM", Agent = a
            });
            mGRForRunset.SolutionApplications = new ObservableList <ApplicationPlatform>();
            mGRForRunset.SolutionApplications.Add(new ApplicationPlatform()
            {
                AppName = "SCM", Platform = ePlatformType.Web, Description = "New application"
            });
            mGRForRunset.BusinessFlows.Add(BF1);
            WorkSpace.Instance.SolutionRepository             = SR;
            mGRForRunset.GingerRunner.SpecificEnvironmentName = environment.Name;
            mGRForRunset.GingerRunner.UseSpecificEnvironment  = false;
            RunSetConfig runSetConfig1 = new RunSetConfig();

            mGRForRunset.IsUpdateBusinessFlowRunList = true;
            runSetConfig1.GingerRunners.Add(mGRForRunset.GingerRunner);
            runSetConfig1.UpdateRunnersBusinessFlowRunsList();
            runSetConfig1.mRunModeParallel = false;
            RunSetActionJSONSummary jsonAction = CreateJsonOperation();

            runSetConfig1.RunSetActions.Add(jsonAction);
            RunsetExecutor GMR1 = new RunsetExecutor();

            GMR1.RunsetExecutionEnvironment = environment;
            GMR1.RunSetConfig = runSetConfig1;
            WorkSpace.Instance.RunsetExecutor = GMR1;

            //Act
            GMR1.RunSetConfig.RunSetActions[0].runSetActionBaseOperations.ExecuteWithRunPageBFES();

            //Assert
            Assert.AreEqual(GMR1.RunSetConfig.RunSetActions[0].Status, RunSetActionBase.eRunSetActionStatus.Completed);
        }
Esempio n. 9
0
        public void TestBusinessFlowVariableSyncWithRepo()
        {
            string variableName = "BFV1";
            string initialValue = "123";
            string updatedValue = "abc123";

            mBF = new BusinessFlow()
            {
                Name = "TestBFVarSync", Active = true
            };

            VariableString V1 = new VariableString()
            {
                Name = variableName, InitialStringValue = initialValue
            };

            mBF.AddVariable(V1);

            // add business flow to the solution repository
            mSolutionRepository.AddRepositoryItem(mBF);

            // prepare to add the variable to the shared repository
            UploadItemSelection uploadItemSelection = new UploadItemSelection()
            {
                UsageItem = V1, ItemUploadType = UploadItemSelection.eItemUploadType.New
            };

            (new SharedRepositoryOperations()).UploadItemToRepository(new Context()
            {
                BusinessFlow = mBF
            }, uploadItemSelection);

            // find the newly added variable from the shared repo
            VariableBase   sharedVariableBase = (from x in mSolutionRepository.GetAllRepositoryItems <VariableBase>() where x.Name == variableName select x).SingleOrDefault();
            VariableString sharedV1           = (VariableString)sharedVariableBase;

            //update the new value in the shared repo variable
            sharedV1.InitialStringValue = updatedValue;

            //sync the updated instance with the business flow instance
            sharedV1.UpdateInstance(V1, "All", mBF);

            // get the updated value from the business flow
            VariableString V2 = (VariableString)mBF.Variables[0];

            //Assert
            Assert.AreEqual(1, mBF.Variables.Count);
            Assert.AreNotSame(V1, V2);
            Assert.AreEqual(updatedValue, V2.InitialStringValue);
        }
Esempio n. 10
0
        public void InstalledPluginPackageFromOnline()
        {
            //Arrange

            // TODO: create a simple plugin for unit test which will download faster.

            string PluginId = "PACT";
            string path     = TestResources.GetTestTempFolder(@"Solutions\PluginsManagerSR1");

            if (Directory.Exists(path))
            {
                Directory.Delete(path, true);
            }

            SolutionRepository solutionRepository = GingerSolutionRepository.CreateGingerSolutionRepository();

            solutionRepository.CreateRepository(path);
            solutionRepository.Open(path);

            PluginsManager pluginsManager = new PluginsManager(solutionRepository);
            ObservableList <PluginPackage> pluginPackages = solutionRepository.GetAllRepositoryItems <PluginPackage>();

            // Act
            var p = pluginsManager.GetOnlinePluginsIndex();
            OnlinePluginPackage onlinePluginPackage = (from x in p where x.Id == PluginId select x).SingleOrDefault();

            //OnlinePluginPackageRelease onlinePluginPackageRelease
            pluginsManager.InstallPluginPackage(onlinePluginPackage, onlinePluginPackage.Releases[0]);
            //string folder = Path.Combine(Common.GetTestResourcesFolder(), @"PluginPackages\SeleniumPluginPackage.1.0.0");


            //Assert
            Assert.AreEqual(1, pluginPackages.Count);
            Assert.AreEqual("PACT", pluginPackages[0].PluginId);
        }
Esempio n. 11
0
        static void CreateWorkspace()
        {
            WorkSpaceEventHandler WSEH = new WorkSpaceEventHandler();

            WorkSpace.Init(WSEH);
            WorkSpace.Instance.RunningFromUnitTest = true;
            WorkSpace.Instance.InitWorkspace(new GingerUnitTestWorkspaceReporter(), new RepoCoreItem());
            WorkSpace.Instance.OpenSolution(mSolutionFolder);
            WorkSpace.Instance.Solution.LoggerConfigurations.SelectedDataRepositoryMethod = Ginger.Reports.ExecutionLoggerConfiguration.DataRepositoryMethod.LiteDB;
            SolutionRepository SR             = WorkSpace.Instance.SolutionRepository;
            RunsetExecutor     runsetExecutor = new RunsetExecutor();

            runsetExecutor.RunsetExecutionEnvironment = (from x in SR.GetAllRepositoryItems <ProjEnvironment>() where x.Name == "Default" select x).SingleOrDefault();
            runsetExecutor.RunSetConfig       = (from x in SR.GetAllRepositoryItems <RunSetConfig>() where x.Name == "Default Run Set" select x).SingleOrDefault();
            WorkSpace.Instance.RunsetExecutor = runsetExecutor;
            WorkSpace.Instance.RunsetExecutor.InitRunners();
        }
Esempio n. 12
0
        private async void RunSet()
        {
            Console.WriteLine(GingerDicser.GetTermResValue(eTermResKey.RunSet) + " Name?");
            string       runSetName   = Console.ReadLine();
            RunSetConfig runSetConfig = (from x in SR.GetAllRepositoryItems <RunSetConfig>() where x.Name == runSetName select x).SingleOrDefault();

            if (runSetConfig == null)
            {
                Console.WriteLine("RunSetConfig not found");
                return;
            }


            Console.WriteLine("starting RunSetConfig execution");
            RunsetExecutor runsetExecuto = new RunsetExecutor();

            runsetExecuto.RunSetConfig = runSetConfig;
            await runsetExecuto.RunRunset();

            Console.WriteLine("Execution completed");
        }
Esempio n. 13
0
        private void RunBusinessFlow()
        {
            Console.WriteLine("Business Flow Name?");
            string       BizFlowName  = Console.ReadLine();
            BusinessFlow businessFlow = (from x in SR.GetAllRepositoryItems <BusinessFlow>() where x.Name == BizFlowName select x).SingleOrDefault();

            if (businessFlow == null)
            {
                Console.WriteLine("Business Flow not found");
                return;
            }
            GingerRunner gingerRunner = new GingerRunner();

            gingerRunner.RunBusinessFlow(businessFlow, true);

            Console.WriteLine("Execution completed");
            Console.WriteLine("BF Status: " + businessFlow.Status);
            foreach (Activity activity in businessFlow.Activities)
            {
                Console.WriteLine("Activity: " + activity.ActivityName + " Status: " + activity.Status);
            }
        }
Esempio n. 14
0
        public void BFVariablesLazyLoadTest_NotLoaded()
        {
            //Arrange
            WorkSpace.Instance.OpenSolution(Path.Combine(TestResources.GetTestResourcesFolder(@"Solutions"), "BasicSimple"));
            SolutionRepository SR = WorkSpace.Instance.SolutionRepository;

            //Act
            ObservableList <BusinessFlow> bfs = SR.GetAllRepositoryItems <BusinessFlow>();

            //Assert
            Assert.AreEqual(bfs.Count, 1, "Validating Bfs were loaded");
            Assert.AreEqual(bfs[0].VariablesLazyLoad, true, "Validating Bf Variables were not loaded");
        }
Esempio n. 15
0
        public void RunsetRunnersLazyLoadTest_NotLoaded()
        {
            //Arrange
            WorkSpace.Instance.OpenSolution(Path.Combine(TestResources.GetTestResourcesFolder(@"Solutions"), "BasicSimple"));
            SolutionRepository SR = WorkSpace.Instance.SolutionRepository;

            //Act
            ObservableList <RunSetConfig> runSetConfigs = SR.GetAllRepositoryItems <RunSetConfig>();

            //Assert
            Assert.AreEqual(runSetConfigs.Count, 1, "Validating run sets were loaded");
            Assert.AreEqual(runSetConfigs[0].GingerRunnersLazyLoad, true, "Validating run set runners were not loaded");
        }
Esempio n. 16
0
        public void GetAllRepositoryItemsUsingParallel()
        {
            //Arrange
            int t1Count = 0;
            int t2Count = 0;

            //Act
            Task t1 = new Task(() =>
            {
                ObservableList <MyRepositoryItem> allMRIs = mSolutionRepository.GetAllRepositoryItems <MyRepositoryItem>();
                t1Count = allMRIs.Count;
                Console.WriteLine("t1.End");
            });
            Task t2 = new Task(() =>
            {
                ObservableList <MyRepositoryItem> allMRIs = mSolutionRepository.GetAllRepositoryItems <MyRepositoryItem>();
                t2Count = allMRIs.Count;
                Console.WriteLine("t2.End");
            });

            t1.Start();
            Console.WriteLine("t1.Start");

            // Let the first thread start and init the list, so second should wait and verify we don't get partial list
            Thread.Sleep(50);
            // since each item load take ~10ms (using sleep in set of attr) the first thread will load about 5 items
            // then we kick off the second thread
            t2.Start();
            // Not t2 should wait for t1 to complete get all items, if it goes back too fast it means it got partial list
            Console.WriteLine("t2.Start");
            Task.WaitAll(t1, t2);

            //Assert

            Assert.IsTrue(t1Count == t2Count, "t1=t2 Count");
            Assert.AreEqual(t1Count, 106, "t1Count");
            Assert.AreEqual(t2Count, 106, "t2Count");
        }
Esempio n. 17
0
        public void SolutionPomElementsLazyLoadTest_NotLoaded()
        {
            //Arrange
            WorkSpace.Instance.OpenSolution(Path.Combine(TestResources.GetTestResourcesFolder(@"Solutions"), "BasicSimple"));
            SolutionRepository SR = WorkSpace.Instance.SolutionRepository;

            //Act
            ObservableList <ApplicationPOMModel> poms = SR.GetAllRepositoryItems <ApplicationPOMModel>();

            //Assert
            Assert.AreEqual(poms.Count, 1, "Validating POMs were loaded");
            Assert.AreEqual(poms[0].UnMappedUIElementsLazyLoad, true, "Validating POM Un Mappped Elements were not loaded");
            Assert.AreEqual(poms[0].MappedUIElementsLazyLoad, true, "Validating POM Mappped Elements were not loaded");
        }
Esempio n. 18
0
        public void SolutionActivitiesLazyLoadTest_Loaded()
        {
            //Arrange
            WorkSpace.Instance.OpenSolution(Path.Combine(TestResources.GetTestResourcesFolder(@"Solutions"), "BasicSimple"));
            SolutionRepository SR = WorkSpace.Instance.SolutionRepository;

            //Act
            ObservableList <BusinessFlow> bfs        = SR.GetAllRepositoryItems <BusinessFlow>();
            ObservableList <Activity>     activities = bfs[0].Activities;

            //Assert
            Assert.AreEqual(bfs.Count, 1, "Validating Bfs were loaded");
            Assert.AreEqual(bfs[0].ActivitiesLazyLoad, false, "Validating Bf Activities were loaded 1");
            Assert.AreEqual(activities.Count, 1, "Validating Bf Activities were loaded 2");
        }
Esempio n. 19
0
        public void ApplicationAPIModelVerifySavedFile()
        {
            // Arrange
            ApplicationAPIModel AAMS1 = new ApplicationAPIModel();

            //AAMS1.GroupName = "Group1";
            AAMS1.Name = "Group1_Operation1";
            SR.AddRepositoryItem(AAMS1);

            //Act
            ObservableList <ApplicationAPIModel> AAMBList = SR.GetAllRepositoryItems <ApplicationAPIModel>();
            ApplicationAPIModel AAMS2 = (ApplicationAPIModel)(from x in AAMBList where x.Guid == AAMS1.Guid select x).FirstOrDefault();

            NewRepositorySerializer RS = new NewRepositorySerializer();
            ApplicationAPIModel     ApplicationAPIModelFromDisk = (ApplicationAPIModel)RS.DeserializeFromFile(AAMS1.FilePath);

            //Assert
            Assert.IsTrue(AAMS2 != null, "New API Model found in AllItems");
            Assert.AreEqual(AAMS1, AAMS2, "Same object is retrieved");

            Assert.AreEqual(AAMS1.Name, ApplicationAPIModelFromDisk.Name, "Name saved to file");
            Assert.AreEqual(AAMS1.Guid, ApplicationAPIModelFromDisk.Guid, "Guid saved to file");
            // TODO: can add more validation
        }
        public void RunsetRunnersLazyLoadTest_Loaded()
        {
            //Arrange
            WorkSpace.Instance.OpenSolution(Path.Combine(TestResources.GetTestResourcesFolder(@"Solutions"), "BasicSimple"), EncryptionHandler.GetDefaultKey());
            SolutionRepository SR = WorkSpace.Instance.SolutionRepository;

            //Act
            ObservableList <RunSetConfig> runSetConfigs = SR.GetAllRepositoryItems <RunSetConfig>();
            ObservableList <GingerRunner> runners       = runSetConfigs[0].GingerRunners;

            //Assert
            Assert.AreEqual(runSetConfigs.Count, 1, "Validating run sets were loaded");
            Assert.AreEqual(runSetConfigs[0].GingerRunnersLazyLoad, false, "Validating run set runners were loaded 1");
            Assert.AreEqual(runners.Count, 1, "Validating run set runners were loaded 2");
        }
        public void VerifyEnvcopyIsOK()
        {
            //Arrange
            string EnvName = "E1";
            ObservableList <ProjEnvironment> allEnvs = mSolutionRepository.GetAllRepositoryItems <ProjEnvironment>();
            ProjEnvironment env1 = (from x in allEnvs where x.Name == EnvName select x).SingleOrDefault();

            //Act
            ProjEnvironment env1Copy = (ProjEnvironment)env1.CreateCopy(false);

            //Assert
            Assert.AreEqual(EnvName, env1.Name);
            Assert.AreEqual(EnvName, env1Copy.Name);
            Assert.AreEqual(env1.Guid, env1Copy.Guid);
        }
        public void BFVariablesLazyLoadTest_Loaded()
        {
            //Arrange
            WorkSpace.Instance.OpenSolution(Path.Combine(TestResources.GetTestResourcesFolder(@"Solutions"), "BasicSimple"), EncryptionHandler.GetDefaultKey());
            SolutionRepository SR = WorkSpace.Instance.SolutionRepository;

            //Act
            ObservableList <BusinessFlow> bfs       = SR.GetAllRepositoryItems <BusinessFlow>();
            ObservableList <VariableBase> variables = bfs[0].Variables;

            //Assert
            Assert.AreEqual(bfs.Count, 1, "Validating Bfs were loaded");
            Assert.AreEqual(bfs[0].VariablesLazyLoad, false, "Validating Bf Variables were loaded 1");
            Assert.AreEqual(variables.Count, 2, "Validating Bf Variables were loaded 2");
        }
        public void GetSolutionEnvs()
        {
            //Arrange

            //Act
            ObservableList <ProjEnvironment> list = SR.GetAllRepositoryItems <ProjEnvironment>();

            //Assert
            Assert.AreEqual(list.Count, 1);
            Assert.AreEqual(list[0].Name, "Default");
        }
Esempio n. 24
0
        public void SolutionPomElementsLazyLoadTest_Loaded()
        {
            //Arrange
            WorkSpace.Instance.OpenSolution(Path.Combine(TestResources.GetTestResourcesFolder(@"Solutions"), "BasicSimple"));
            SolutionRepository SR = WorkSpace.Instance.SolutionRepository;

            //Act
            ObservableList <ApplicationPOMModel> poms     = SR.GetAllRepositoryItems <ApplicationPOMModel>();
            ObservableList <ElementInfo>         unMapped = poms[0].UnMappedUIElements;
            ObservableList <ElementInfo>         mapped   = poms[0].MappedUIElements;

            //Assert
            Assert.AreEqual(poms.Count, 1, "Validating POMs were loaded");
            Assert.AreEqual(poms[0].UnMappedUIElementsLazyLoad, false, "Validating POM Un Mappped Elements were loaded 1");
            //Assert.AreEqual(unMapped.Count, 1, "Validating POM Un Mappped Elements were loaded 2"); //TODO: move HtmlElementInfo to .NET core project for enabeling this Assert
            Assert.AreEqual(poms[0].MappedUIElementsLazyLoad, false, "Validating POM Mappped Elements were not loaded 1");
            //Assert.AreEqual(mapped.Count, 15, "Validating POM Mappped Elements were not loaded 2 "); //TODO: move HtmlElementInfo to .NET core project for enabeling this Assert
        }
Esempio n. 25
0
        public void GetAllRepositoryItems()
        {
            //Arrange

            //Act
            ObservableList <MyRepositoryItem> allMRIs = mSolutionRepository.GetAllRepositoryItems <MyRepositoryItem>();


            //Assert

            // Verify we got item from root folder
            Assert.AreEqual("A1", (from x in allMRIs where x.Name == "A1" select x.Name).SingleOrDefault());
            // Verify we got item from sub/sub folder
            Assert.AreEqual("A6", (from x in allMRIs where x.Name == "A6" select x.Name).SingleOrDefault());
        }