Publish() public method

public Publish ( ) : void
return void
Ejemplo n.º 1
0
        public void GenericContent_KeepBinaryAfterPublish()
        {
            Page samplePage = new Page(TestRoot);
            
            samplePage.Name = "SamplePage";
            samplePage.VersioningMode = ContentRepository.Versioning.VersioningType.MajorAndMinor;
            samplePage.ApprovingMode = ContentRepository.Versioning.ApprovingType.True;
            
            //set binaries
            BinaryData pageBinaryData = CreateBinaryDataFromString("Page Binary");
            BinaryData psBinaryData = CreateBinaryDataFromString("Page PersonalizationSettings");

            samplePage.Binary = pageBinaryData;
            samplePage.PersonalizationSettings = psBinaryData;

            //save page
            samplePage.Save();
            samplePage.CheckOut();
            samplePage.Publish();

            //asserts
            //TODO: CheckBinariesInPageByString hosszutavon folosleges
            CheckBinariesInPageByString(samplePage, "Page Binary", "Page PersonalizationSettings");
            CheckBinariesInPageByByte(samplePage,pageBinaryData.GetStream(),psBinaryData.GetStream());
            
        }
Ejemplo n.º 2
0
        public void GenericContent_KeepIconAfterPublish()
        {
            Page samplePage = new Page(TestRoot);

            samplePage.Name = "SamplePage";

            //set index
            string icon = "icon.ic";
            samplePage.Icon = icon;

            samplePage.Save();
            samplePage.CheckOut();
            samplePage.Publish();

            //asserts
            Assert.AreEqual(icon, samplePage.Icon, "Icon property doesn't contain the expected value.");

        }
Ejemplo n.º 3
0
        public void GenericContent_KeepTextPropertyAfterPublish()
        {
            Page samplePage = new Page(TestRoot);

            samplePage.Name = "SamplePage";

            //set sample page
            string textProperty = "minta property";
            samplePage.Keywords = textProperty;

            samplePage.Save();
            samplePage.CheckOut();
            samplePage.Publish();

            //asserts
            Assert.AreEqual(textProperty, samplePage.Keywords, "Keywords property doesn't contain the expected strings.");

        }
Ejemplo n.º 4
0
        public void GenericContent_KeepIndexAfterPublish()
        {
            Page samplePage = new Page(TestRoot);

            samplePage.Name = "SamplePage";

            //set index
            int index = 15;
            samplePage.Index = index;

            samplePage.Save();
            samplePage.CheckOut();
            samplePage.Publish();

            //asserts
            Assert.AreEqual(index, samplePage.Index, "Index property doesn't contain the expected value.");

        }
Ejemplo n.º 5
0
        public void GenericContent_KeepReferenceAfterPublish()
        {
            //create page template
            PageTemplate samplePageTemplate = new PageTemplate(TestRoot);
            samplePageTemplate.Name = "Sample Page Template";
            samplePageTemplate.Binary = CreateBinaryDataFromString("<html><head></head><body></body></html>");
            samplePageTemplate.Save();

            Page samplePage = new Page(TestRoot);

            samplePage.Name = "SamplePage";

            //set reference
            samplePage.PageTemplateNode = samplePageTemplate;

            samplePage.Save();
            samplePage.CheckOut();
            samplePage.Publish();

            //asserts
            CheckPageTemplateInPage(samplePage, samplePageTemplate.Id);

        }