예제 #1
0
        public void ListContentFluentConstructorWithNameAndEnumerableListItemContent_FillsNameAndItems()
        {
            var repeatContent = RepeatContent.Create("Name", new List <Content>());

            Assert.IsNotNull(repeatContent.Items);
            Assert.AreEqual("Name", repeatContent.Name);
        }
예제 #2
0
        public void ListContentFluentConstructorWithNameAndItems_FillsNameAndItems()
        {
            var repeatContent = RepeatContent.Create("Name", new Content(), new Content());

            Assert.AreEqual(2, repeatContent.Items.Count);
            Assert.AreEqual("Name", repeatContent.Name);
        }
예제 #3
0
        public void ListContentFluentAddItem_FillsNameAndItems()
        {
            var repeatContent = RepeatContent.Create("Name", new List <Content>())
                                .AddItem(new Content(new FieldContent("ItemName", "Name")));

            Assert.IsNotNull(repeatContent.Items);
            Assert.AreEqual("Name", repeatContent.Name);
            Assert.AreEqual(repeatContent.Items.Count, 1);
            Assert.AreEqual(repeatContent.Items.First().Fields.Count, 1);
            Assert.AreEqual(repeatContent.Items.First().Fields.First().Name, "ItemName");
            Assert.AreEqual(repeatContent.Items.First().Fields.First().Value, "Name");
        }