public void Instantiate_WithDefaultValues()
        {
            BindableDomainObjectProvider provider = new BindableDomainObjectProvider();

            Assert.IsInstanceOf(typeof(BindableDomainObjectMetadataFactory), provider.MetadataFactory);
            Assert.IsInstanceOf(typeof(BindableObjectServiceFactory), provider.ServiceFactory);
        }
        public void Instantiate_WithCustomValues()
        {
            IMetadataFactory metadataFactoryStub             = MockRepository.GenerateStub <IMetadataFactory>();
            IBusinessObjectServiceFactory serviceFactoryStub = MockRepository.GenerateStub <IBusinessObjectServiceFactory>();
            BindableDomainObjectProvider  provider           = new BindableDomainObjectProvider(metadataFactoryStub, serviceFactoryStub);

            Assert.That(provider.MetadataFactory, Is.SameAs(metadataFactoryStub));
            Assert.That(provider.ServiceFactory, Is.SameAs(serviceFactoryStub));
        }
 public void Instantiate_WithMixin()
 {
     using (MixinConfiguration.BuildNew().ForClass(typeof(BindableDomainObjectMetadataFactory)).AddMixin <MixinStub> ().EnterScope())
     {
         BindableDomainObjectProvider provider = new BindableDomainObjectProvider();
         Assert.That(provider.MetadataFactory, Is.InstanceOf(typeof(BindableDomainObjectMetadataFactory)));
         Assert.That(provider.MetadataFactory, Is.InstanceOf(typeof(IMixinTarget)));
         Assert.That(provider.ServiceFactory, Is.InstanceOf(typeof(BindableObjectServiceFactory)));
     }
 }