Example #1
0
 public void AddModelBindingKey(ModelBindingKey key)
 {
     if (_lastBinding != null)
     {
         _lastBinding.Add(key);
     }
 }
Example #2
0
 public void AddBindingDetail(ModelBindingKey binding)
 {
     if (_currentModelBinding != null)
     {
         _currentModelBinding.Add(binding);
     }
 }
Example #3
0
        public void record_model_binding()
        {
            report.StartBehavior(inner);
            report.StartBehavior(inner);

            report.StartModelBinding(typeof (BinderTarget));
            var bindingKey = new ModelBindingKey();
            report.AddBindingDetail(bindingKey);
            Thread.Sleep(100);

            var target = new object();

            report.EndModelBinding(target);

            var modelBinding = report.Skip(1).First().Skip(1).First().ShouldBeOfType<ModelBindingReport>();

            modelBinding.StoredObject.ShouldBeTheSameAs(target);
            modelBinding.First().ShouldBeTheSameAs(bindingKey);
            modelBinding.ExecutionTime.ShouldBeGreaterThan(0);
        }