コード例 #1
0
        public void GenericContent_KeepIconAfterUndocheckout()
        {
            Page samplePage = new Page(TestRoot);

            samplePage.Name = "SamplePage";

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

            samplePage.Save();
            samplePage.CheckOut();
            samplePage.UndoCheckOut();

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

        }
コード例 #2
0
        public void GenericContent_KeepIndexAfterUndocheckout()
        {
            Page samplePage = new Page(TestRoot);

            samplePage.Name = "SamplePage";

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

            samplePage.Save();
            samplePage.CheckOut();
            samplePage.UndoCheckOut();

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

        }
コード例 #3
0
        public void GenericContent_KeepReferenceAfterUndocheckout()
        {
            //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.UndoCheckOut();

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

        }
コード例 #4
0
        public void GenericContent_KeepTextPropertyAfterUndocheckout()
        {
            Page samplePage = new Page(TestRoot);

            samplePage.Name = "SamplePage";

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

            samplePage.Save();
            samplePage.CheckOut();
            samplePage.UndoCheckOut();

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

        }
コード例 #5
0
        public void GenericContent_KeepBinaryAfterUndocheckout()
        {
            Page samplePage = new Page(TestRoot);

            samplePage.Name = "SamplePage";

            //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.UndoCheckOut();

            //asserts
            //TODO: CheckBinariesInPageByString hosszutavon folosleges
            CheckBinariesInPageByString(samplePage, "Page Binary", "Page PersonalizationSettings");
            CheckBinariesInPageByByte(samplePage, pageBinaryData.GetStream(), psBinaryData.GetStream());

        }