public void TearDown()
 {
     ServerOperations.ContentBlocks().DeleteAllContentBlocks(SecondProviderName);
     ServerOperations.ContentBlocks().DeleteAllContentBlocks();
     ServerOperations.Pages().DeleteAllPages();
     ServerOperations.ContentBlocks().RemoveSecondDataProvider();
 }
Exemplo n.º 2
0
        public void SetUp()
        {
            for (int i = 0; i < 3; i++)
            {
                ServerOperations.News().CreatePublishedNewsItem(newsTitle: NewsItemTitle + i, newsContent: NewsItemContent + i, author: NewsItemAuthor + i);
            }

            for (int i = 0; i < 4; i++)
            {
                ServerOperations.ContentBlocks().CreateContentBlock(ContentBlockTitle + i, ContentBlockContent + i);
            }

            Guid pageId = ServerOperations.Pages().CreatePage(PageName);

            var assembly = FileInjectHelper.GetArrangementsAssembly();

            ////  inject DesignerView.Selector.cshtml
            Stream source = assembly.GetManifestResourceStream(FileResource);

            var viewPath = Path.Combine("MVC", "Views", "DummyText", DesignerViewFileName);

            string filePath = FileInjectHelper.GetDestinationFilePath(viewPath);

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

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

            ////  inject DesignerView.Selector.json
            Stream sourceJson = assembly.GetManifestResourceStream(FileResourceJson);
            var    jsonPath   = Path.Combine("MVC", "Views", "DummyText", JsonFileName);

            string filePathJson = FileInjectHelper.GetDestinationFilePath(jsonPath);

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

            FileInjectHelper.CopyStream(sourceJson, destinationJson);
            sourceJson.Close();
            destinationJson.Close();

            ////  inject designerview-selector.js
            Stream sourceController = assembly.GetManifestResourceStream(ControllerFileResource);
            var    controllerPath   = Path.Combine("MVC", "Scripts", "DummyText", ControllerFileName);

            string controllerFilePath = FileInjectHelper.GetDestinationFilePath(controllerPath);

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

            FileInjectHelper.CopyStream(sourceController, destinationController);

            sourceController.Close();
            destinationController.Close();

            ServerOperations.Widgets().AddMvcWidgetToPage(pageId, typeof(DummyTextController).FullName, WidgetCaption);
        }
Exemplo n.º 3
0
 public void TearDown()
 {
     ServerOperations.Pages().DeleteAllPages();
     ServerOperations.ContentBlocks().DeleteAllContentBlocks();
     using (new UnrestrictedModeRegion())
     {
         ServerOperations.StaticModules().ActivateModule(FeatherModuleName);
     }
 }
        public void SetUp()
        {
            var providerName = ContentManager.GetManager().Provider.Name;

            ServerOperationsFeather.ContentBlockOperations().CreateContentBlock(ContentBlockTitle, ContentBlockContent, providerName);
            Guid page1Id = ServerOperations.Pages().CreatePage(PageName);

            ServerOperationsFeather.Pages().AddSharedContentBlockWidgetToPage(page1Id, ContentBlockTitle);
            ServerOperations.ContentBlocks().AddSharedContentToPage(page1Id, ContentBlockTitle);
        }
        public void SetUp()
        {
            AuthenticationHelper.AuthenticateUser(this.AdminEmail, this.AdminPass, true);
            ServerOperations.ContentBlocks().CreateSecondDataProvider();
            Guid page1Id      = ServerOperations.Pages().CreatePage(PageName);
            var  providerName = ContentManager.GetManager().Provider.Name;

            ServerOperationsFeather.Pages().AddContentBlockWidgetToPage(page1Id, Content);
            ServerOperationsFeather.ContentBlockOperations().CreateContentBlock("Content Block 1", "Content 1", providerName);
            ServerOperationsFeather.ContentBlockOperations().CreateContentBlock("Content Block 2", "Content 2", SecondProviderName);
        }
Exemplo n.º 6
0
        public void TearDown()
        {
            ServerOperations.Pages().DeleteAllPages();
            ServerOperations.News().DeleteAllNews();
            ServerOperations.ContentBlocks().DeleteAllContentBlocks();

            var    path     = Path.Combine("MVC", "Views", "DummyText", DesignerViewFileName);
            string filePath = FileInjectHelper.GetDestinationFilePath(path);

            File.Delete(filePath);

            var    jsonPath     = Path.Combine("MVC", "Views", "DummyText", JsonFileName);
            string filePathJson = FileInjectHelper.GetDestinationFilePath(jsonPath);

            File.Delete(filePathJson);

            var    controllerPath     = Path.Combine("MVC", "Scripts", "DummyText", ControllerFileName);
            string controllerFilePath = FileInjectHelper.GetDestinationFilePath(controllerPath);

            File.Delete(controllerFilePath);
        }
 public void TearDown()
 {
     ServerOperations.Pages().DeleteAllPages();
     ServerOperations.ContentBlocks().DeleteAllContentBlocks();
 }
Exemplo n.º 8
0
 public void TearDown()
 {
     ServerOperations.Pages().DeleteAllPages();
     ServerOperations.ContentBlocks().DeleteAllContentBlocks();
     ServerOperations.StaticModules().ActivateModule(FeatherModuleName);
 }