public void SetUp()
        {
            string templateFileOriginal = FileInjectHelper.GetDestinationFilePath(this.layoutTemplatePath);
            string templateFileCopy     = FileInjectHelper.GetDestinationFilePath(this.newLayoutTemplatePath);

            PageManager pageManager    = PageManager.GetManager();
            int         templatesCount = pageManager.GetTemplates().Count();

            File.Copy(templateFileOriginal, templateFileCopy);
            FeatherServerOperations.ResourcePackages().WaitForTemplatesCountToIncrease(templatesCount, 1);

            string filePath = FileInjectHelper.GetDestinationFilePath(this.gridPath);

            Directory.CreateDirectory(Path.GetDirectoryName(filePath));
            Stream destination = new FileStream(filePath, FileMode.Create, FileAccess.Write);

            var    assembly = FileInjectHelper.GetArrangementsAssembly();
            Stream source   = assembly.GetManifestResourceStream(FileResource);

            FileInjectHelper.CopyStream(source, destination);
            source.Close();
            destination.Close();

            FeatherServerOperations.GridWidgets().AddGridControlToToolboxesConfig(GridTitle, GridCss, GridVirtualPath);
            Guid templateId = ServerOperations.Templates().GetTemplateIdByTitle(PageTemplateName);

            ServerOperations.Pages().CreatePage(PageName, templateId);
        }
        public void TearDown()
        {
            ServerOperations.Pages().DeleteAllPages();
            string filePath = FileInjectHelper.GetDestinationFilePath(this.gridPath);

            File.Delete(filePath);
            FeatherServerOperations.GridWidgets().RemoveGridControlFromToolboxesConfig(GridTitle);
        }
Пример #3
0
        public void TearDown()
        {
            AuthenticationHelper.AuthenticateUser(AdminUserName, AdminPass, true);

            ServerOperations.Pages().DeleteAllPages();
            string filePath = FileInjectHelper.GetDestinationFilePath(this.gridPath);

            File.Delete(filePath);
            FeatherServerOperations.GridWidgets().RemoveGridControlFromToolboxesConfig(GridTitle);
        }
        public void TearDown()
        {
            ServerOperations.Pages().DeleteAllPages();

            string filePath         = FileInjectHelper.GetDestinationFilePath(this.gridPath);
            string templateFileCopy = FileInjectHelper.GetDestinationFilePath(this.newLayoutTemplatePath);

            File.Delete(filePath);
            File.Delete(templateFileCopy);

            ServerOperations.Templates().DeletePageTemplate(PageTemplateName);
            FeatherServerOperations.GridWidgets().RemoveGridControlFromToolboxesConfig(GridTitle);
        }
Пример #5
0
        public void SetUp()
        {
            string filePath = FileInjectHelper.GetDestinationFilePath(this.gridPath);

            Directory.CreateDirectory(Path.GetDirectoryName(filePath));
            Stream destination = new FileStream(filePath, FileMode.Create, FileAccess.Write);

            var    assembly = FileInjectHelper.GetArrangementsAssembly();
            Stream source   = assembly.GetManifestResourceStream(FileResource);

            FileInjectHelper.CopyStream(source, destination);
            source.Close();
            destination.Close();

            FeatherServerOperations.GridWidgets().AddGridControlToToolboxesConfig(GridTitle, GridCss, GridVirtualPath);
            Guid templateId = ServerOperations.Templates().GetTemplateIdByTitle(PageTemplateName);

            ServerOperations.Pages().CreatePage(PageName, templateId);
        }