Ejemplo n.º 1
0
 public void build_passes_through()
 {
     var binder = new PassthroughConverter<HttpPostedFileBase>();
     var context = MockRepository.GenerateMock<IPropertyContext>();
     context.Expect(c => c.PropertyValue).Return(new object());
     ValueConverter converter = binder.Build(MockRepository.GenerateStub<IValueConverterRegistry>(), property(x => x.File));
     converter.Convert(context);
     context.VerifyAllExpectations();
 }
Ejemplo n.º 2
0
        public void build_passes_through()
        {
            var             binder  = new PassthroughConverter <HttpPostedFileBase>();
            IBindingContext context = MockRepository.GenerateMock <IBindingContext>();

            context.Expect(c => c.PropertyValue).Return(new object());
            ValueConverter converter = binder.Build(MockRepository.GenerateStub <IValueConverterRegistry>(), property(x => x.File));

            converter(context);
            context.VerifyAllExpectations();
        }
        public void build_passes_through()
        {
            var binder  = new PassthroughConverter <HttpPostedFileBase>();
            var context = MockRepository.GenerateMock <IPropertyContext>();

            context.Expect(c => c.RawValueFromRequest).Return(new BindingValue()
            {
                RawValue = new object()
            });
            ValueConverter converter = binder.Build(MockRepository.GenerateStub <IValueConverterRegistry>(), property(x => x.File));

            converter.Convert(context);
            context.VerifyAllExpectations();
        }