Esempio n. 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;
        }
Esempio n. 2
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;
        }