Esempio n. 1
0
 public void TestTextFieldMapping()
 {
     //contentContainerMapping.AddMapping(x => x.Title, new TextFieldAttribute("title"));
     var container = new BindingContainer(ViewModelDefaults.ModelResolver, ViewModelDefaults.ReflectionCache,
         new TestModule());
     var mapping = container.GetMapping<ContentContainerViewModel>();
     var model = DefaultMappedModelFactory.Instance.BuildMappedModel<ContentContainerViewModel>(contentContainerModelData, mapping);
     Assert.IsNotNull(model.Title);
 }
Esempio n. 2
0
 public void TestNestedComponentMapping()
 {
     var container = new BindingContainer(ViewModelDefaults.ModelResolver, ViewModelDefaults.ReflectionCache,
         new TestModule());
     ContentContainerViewModel model = null;
     for (int i = 0; i < 1000; i++)
     {
         var mapping = container.GetMapping<ContentContainerViewModel>();
         model = DefaultMappedModelFactory.Instance.BuildMappedModel<ContentContainerViewModel>(contentContainerModelData, mapping);
     }
     Assert.IsNotNull(model.ContentList);
 }