Beispiel #1
0
 public void Populate(ComplexModelWithList model)
 {
     model.Links = new string[]
     {
         "Link1", "Link2"
     };
 }
Beispiel #2
0
        public void CanGenerateLinksForClassWithListProperty()
        {
            LinkPopulator linkPopulator = new LinkPopulator(linkGenerators);
            var           complexModel  = new ComplexModelWithList()
            {
                SimpleModel = new SimpleModel[] { new SimpleModel() }
            };

            linkPopulator.PopulateLinks(complexModel);

            Assert.That(complexModel.Links.Length, Is.EqualTo(2));
            Assert.That(complexModel.SimpleModel[0].Links.Length, Is.EqualTo(2));
        }