public void ListContentFluentConstructorWithNameAndEnumerableListItemContent_FillsNameAndItems() { var repeatContent = RepeatContent.Create("Name", new List <Content>()); Assert.IsNotNull(repeatContent.Items); Assert.AreEqual("Name", repeatContent.Name); }
public void ListContentFluentConstructorWithNameAndItems_FillsNameAndItems() { var repeatContent = RepeatContent.Create("Name", new Content(), new Content()); Assert.AreEqual(2, repeatContent.Items.Count); Assert.AreEqual("Name", repeatContent.Name); }
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"); }