Exemple #1
0
 public void TearDown()
 {
     if (monitorsToDelete.Count > 0)
     {
         externalMonitor.DeleteMonitors(monitorsToDelete.ToArray());
         monitorsToDelete.Clear();
     }
 }
Exemple #2
0
        private void AddPageAddNewExternalMonitorAddPageModuleDeleteMonitorDeletePage(OutputType output)
        {
            //add page
            string pageName = "Test api page" + Common.GenerateRandomString(5);
            int    pageId   = layout.AddPage(pageName, 2, output);
            //add external monitor
            ExternalMonitor externalMonitor   = new ExternalMonitor(authentication);
            int             idMonitorToDelete = ExternalMonitorTests.AddMonitor(externalMonitor, output);

            //add module
            int pageModuleId = layout.AddPageModule(Layout.ModulName.External, pageId, 2, 2, idMonitorToDelete,
                                                    output: output);

            //delete page module
            layout.DeletePageModule(pageModuleId, output: output);
            //delete module
            externalMonitor.DeleteMonitors(testId: idMonitorToDelete, output: output);
            //delete page
            layout.DeletePage(pageId, output);
        }
        private void AddPageAddNewExternalMonitorAddPageModuleDeleteMonitorDeletePage(OutputType output)
        {
            //add page
            string pageName = "Test api page" + Common.GenerateRandomString(5);
            int pageId = layout.AddPage(pageName, 2, output);
            //add external monitor
            ExternalMonitor externalMonitor = new ExternalMonitor(authentication);
            int idMonitorToDelete = ExternalMonitorTests.AddMonitor(externalMonitor, output);

            //add module
            int pageModuleId = layout.AddPageModule(Layout.ModulName.External, pageId, 2, 2, idMonitorToDelete,
                                                    output: output);
            //delete page module
            layout.DeletePageModule(pageModuleId, output: output);
            //delete module
            externalMonitor.DeleteMonitors(testId: idMonitorToDelete, output: output);
            //delete page
            layout.DeletePage(pageId, output);
        }