Пример #1
0
        public virtual void SetUp()
        {
            var cache         = new ImmutableInMemorySpecCache();
            var config        = new ReflectorConfiguration(new[] { typeof(List <TestPoco>), typeof(ArrayList) }, new Type[] { }, new Type[] { }, new Type[] { }, new[] { typeof(TestPoco).Namespace });
            var menuFactory   = new NullMenuFactory();
            var classStrategy = new DefaultClassStrategy(config);
            var metamodel     = new Metamodel(classStrategy, cache);
            var reflector     = new Reflector(classStrategy, metamodel, config, menuFactory, new IFacetDecorator[] { }, facetFactories);

            Specification = LoadSpecification(reflector);
            Metamodel     = metamodel;
        }
Пример #2
0
        public override void SetUp()
        {
            base.SetUp();
            var cache = new ImmutableInMemorySpecCache();
            var reflectorConfiguration = new ReflectorConfiguration(new Type[] { }, new Type[] { }, new Type[] { }, new Type[] { }, new string[] { });

            facetFactory = new RemoveEventHandlerMethodsFacetFactory(0);
            var menuFactory   = new NullMenuFactory();
            var classStrategy = new DefaultClassStrategy(reflectorConfiguration);
            var metamodel     = new Metamodel(classStrategy, cache);

            Reflector = new Reflector(classStrategy, metamodel, reflectorConfiguration, menuFactory, new IFacetDecorator[] {}, new IFacetFactory[] { facetFactory });
        }
Пример #3
0
        public override void SetUp()
        {
            base.SetUp();

            var cache       = new ImmutableInMemorySpecCache();
            var config      = new ReflectorConfiguration(new Type[] { }, new Type[] { }, new Type[] { }, new Type[] { }, new[] { typeof(Customer).Namespace });
            var menuFactory = new NullMenuFactory();

            facetFactory = new UnsupportedMethodFilteringFactory(0);
            var classStrategy = new DefaultClassStrategy(config);
            var metamodel     = new Metamodel(classStrategy, cache);

            Reflector = new Reflector(classStrategy, metamodel, config, menuFactory, new IFacetDecorator[] {}, new IFacetFactory[] { facetFactory });
        }
Пример #4
0
        public override void SetUp()
        {
            base.SetUp();
            var cache = new ImmutableInMemorySpecCache();

            ReflectorConfiguration.NoValidate = true;

            var reflectorConfiguration = new ReflectorConfiguration(new Type[] { }, new Type[] { }, new string[] { });

            facetFactory = new RemoveIgnoredMethodsFacetFactory(0, LoggerFactory);
            var menuFactory       = new NullMenuFactory();
            var classStrategy     = new DefaultClassStrategy(reflectorConfiguration);
            var metamodel         = new Metamodel(classStrategy, cache, null);
            var mockLogger        = new Mock <ILogger <Reflector> >().Object;
            var mockLoggerFactory = new Mock <ILoggerFactory>().Object;

            Reflector = new Reflector(classStrategy, metamodel, reflectorConfiguration, menuFactory, new IFacetDecorator[] { }, new IFacetFactory[] { facetFactory }, mockLoggerFactory, mockLogger);
        }
Пример #5
0
        public virtual void SetUp()
        {
            var cache = new ImmutableInMemorySpecCache();

            ReflectorConfiguration.NoValidate = true;
            var config            = new ReflectorConfiguration(new[] { typeof(List <TestPoco>), typeof(ArrayList) }, new Type[] { }, new[] { typeof(TestPoco).Namespace });
            var menuFactory       = new NullMenuFactory();
            var classStrategy     = new DefaultClassStrategy(config);
            var mockLogger        = new Mock <ILogger <Metamodel> >().Object;
            var metamodel         = new Metamodel(classStrategy, cache, mockLogger);
            var mockLogger1       = new Mock <ILogger <Reflector> >().Object;
            var mockLoggerFactory = new Mock <ILoggerFactory>().Object;

            var reflector = new Reflector(classStrategy, metamodel, config, menuFactory, new IFacetDecorator[] { }, facetFactories, mockLoggerFactory, mockLogger1);

            Specification = LoadSpecification(reflector);
            Metamodel     = metamodel;
        }
Пример #6
0
        public override void SetUp()
        {
            base.SetUp();
            var cache = new ImmutableInMemorySpecCache();

            ObjectReflectorConfiguration.NoValidate = true;

            var reflectorConfiguration = new ObjectReflectorConfiguration(new Type[] { }, new Type[] { });

            facetFactory = new RemoveIgnoredMethodsFacetFactory(GetOrder <RemoveIgnoredMethodsFacetFactory>(), LoggerFactory);
            var objectFactFactorySet = new ObjectFacetFactorySet(new IObjectFacetFactoryProcessor[] { facetFactory });
            var classStrategy        = new ObjectClassStrategy(reflectorConfiguration);
            var metamodel            = new Metamodel(cache, null);
            var mockLogger           = new Mock <ILogger <AbstractParallelReflector> >().Object;
            var mockLoggerFactory    = new Mock <ILoggerFactory>().Object;

            Reflector = new ObjectReflector(objectFactFactorySet, classStrategy, metamodel, reflectorConfiguration, new IFacetDecorator[] { }, mockLoggerFactory, mockLogger);
        }
        public override void SetUp()
        {
            base.SetUp();

            var cache = new ImmutableInMemorySpecCache();

            ReflectorConfiguration.NoValidate = true;

            var config      = new ReflectorConfiguration(new Type[] { }, new Type[] { }, new[] { typeof(Customer).Namespace });
            var menuFactory = new NullMenuFactory();

            facetFactory = new SystemClassMethodFilteringFactory(0, LoggerFactory);
            var classStrategy     = new DefaultClassStrategy(config);
            var metamodel         = new Metamodel(classStrategy, cache, null);
            var mockLogger        = new Mock <ILogger <Reflector> >().Object;
            var mockLoggerFactory = new Mock <ILoggerFactory>().Object;

            Reflector = new Reflector(classStrategy, metamodel, config, menuFactory, new IFacetDecorator[] { }, new IFacetFactory[] { facetFactory }, mockLoggerFactory, mockLogger);
        }
        public virtual void SetUp()
        {
            var cache = new ImmutableInMemorySpecCache();

            ObjectReflectorConfiguration.NoValidate = true;



            var mockLogger = new Mock <ILogger <Metamodel> >().Object;

            var metamodel         = new Metamodel(cache, mockLogger);
            var mockLoggerFactory = new Mock <ILoggerFactory>().Object;

            var reflector = Reflector(metamodel, mockLoggerFactory);

            ITypeSpecBuilder spec;

            (spec, Metamodel) = LoadSpecification(reflector);
            Specification     = spec as IObjectSpecImmutable;
        }
        public override void SetUp() {
            base.SetUp();
            var cache = new ImmutableInMemorySpecCache();
            ReflectorConfiguration.NoValidate = true;

            var reflectorConfiguration = new ReflectorConfiguration(new Type[] {}, new Type[] {}, new string[] {});
            facetFactory = new RemoveIgnoredMethodsFacetFactory(0);
            var menuFactory = new NullMenuFactory();
            var classStrategy = new DefaultClassStrategy(reflectorConfiguration);
            var metamodel = new Metamodel(classStrategy, cache);

            Reflector = new Reflector(classStrategy, metamodel, reflectorConfiguration, menuFactory, new IFacetDecorator[] {}, new IFacetFactory[] {facetFactory});
        }