Ejemplo n.º 1
0
        public static IObjectBlockReader Reader()
        {
            var registry = new BindingRegistry();

            registry.Add(new VersionConstraintConverter());
            registry.Add(new GroupedDependencyConverter());

            var services = new InMemoryServiceLocator();
            var resolver = new ObjectResolver(services, registry, new NulloBindingLogger());

            services.Add <IObjectResolver>(resolver);

            return(new ObjectBlockReader(new ObjectBlockParser(), resolver, services, new RippleBlockRegistry()));
        }
Ejemplo n.º 2
0
        public void SetUp()
        {
            var registry = new BindingRegistry();

            registry.Add(new FakeModelBinder());
            theDescription = Description.For(registry);
        }
        public void can_write_out_binding_registry_description()
        {
            var bindingRegistry = new BindingRegistry();

            bindingRegistry.Add(new FakeModelBinder());

            var description = Description.For(bindingRegistry);
            var writer      = new DescriptionTextWriter(description);

            Debug.WriteLine(writer.ToString());
        }
        protected override void beforeEach()
        {
            theProperty = ReflectionHelper.GetProperty <Case>(x => x.Identifier);

            MockFor <IBindingContext>().Stub(x => x.Logger).Return(MockFor <IBindingLogger>());

            thePropertyBinder = MockFor <IPropertyBinder>();

            var registry = new BindingRegistry();

            Services.Inject(registry);
            registry.Add(thePropertyBinder);

            thePropertyBinder.Stub(x => x.Matches(null)).IgnoreArguments().Return(true);
            ClassUnderTest.PopulateProperty(typeof(Case), theProperty, MockFor <IBindingContext>());
        }