public void AddContentItemAddsMultipleWithSameContentId()
        {
            var content = new ContentManagement();

            content.AddContentItem("MyId", "This is a string");
            content.AddContentItem("MyId", "This is a string2");
        }
        public void RetrieveContentItemGetsItemsFromCms()
        {
            var content = new ContentManagement();

            content.AddContentItem("MyId", "This is a string");
            content.AddContentItem("MyId2", "This is a string2");

            Assert.AreEqual(2, content.CountContentItems);
            Assert.AreEqual("This is a string", content.RetrieveContentItem("MyId"));
            Assert.AreEqual("This is a string2", content.RetrieveContentItem("MyId2"));
        }
        public void ExistsReturnsFalseForItemsThatDoNotExist()
        {
            var content = new ContentManagement();

            content.AddContentItem("MyId", "This is a string");
            content.AddContentItem("MyId2", "This is a string2");

            Assert.AreEqual(2, content.CountContentItems);
            Assert.IsFalse(content.Exists("not exist"));
            Assert.IsFalse(content.Exists("not exist 2"));
        }
Beispiel #4
0
        public void ExistsCompressedReturnsTrueForItemsThatExist()
        {
            var content = new ContentManagement(true);

            content.AddContentItem("MyId", "This is a string");
            content.AddContentItem("MyId2", "This is a string2");

            Assert.AreEqual(2, content.CountContentItems);
            Assert.IsTrue(content.Exists("MyId"));
            Assert.IsTrue(content.Exists("MyId2"));
        }
Beispiel #5
0
        public void AddCompressedContentItemAddsMultipleContentItemsToCms()
        {
            var content = new ContentManagement(true);

            content.AddContentItem("MyId", "This is a string");
            content.AddContentItem("MyId2", "This is a string2");

            Assert.AreEqual(2, content.CountContentItems);
            Assert.AreEqual("This is a string", content.RetrieveContentItem("MyId"));
            Assert.AreEqual("This is a string2", content.RetrieveContentItem("MyId2"));
        }
        public void AddContentItemAddsContentToCms()
        {
            var content = new ContentManagement();

            content.AddContentItem("MyId", "This is a string");

            Assert.AreEqual(1, content.CountContentItems);
            Assert.AreEqual("This is a string", content.RetrieveContentItem("MyId"));
        }
        public void AddContentItemThrowsArgumentNullExceptionIfContentNull()
        {
            var content = new ContentManagement();

            content.AddContentItem("MyId", "");
        }
Beispiel #8
0
        public void AddCompressedContentItemThrowsArgumentNullExceptionIfIdentifierNull()
        {
            var content = new ContentManagement(true);

            content.AddContentItem("", "");
        }