Пример #1
0
        public ITypeDiscoveryService GetTypeDiscoveryService(params Assembly[] rootAssemblies)
        {
            var baseTypeDiscoveryService = new FixedTypeDiscoveryService(Assembly.GetExecutingAssembly().GetTypes());

            return(FilteringTypeDiscoveryService.CreateFromNamespaceWhitelist(
                       baseTypeDiscoveryService,
                       "Remotion.Data.DomainObjects.UnitTests.Persistence.Rdbms.SchemaGenerationTestDomain"));
        }
        public void GetTypes_ExcludeGlobalTypes_False()
        {
            var service = new FixedTypeDiscoveryService(new[] { typeof(FixedTypeDiscoveryServiceTest), typeof(object) });

            Assert.That(service.GetTypes(null, false), Is.EqualTo(new[] { typeof(FixedTypeDiscoveryServiceTest), typeof(object) }));
        }
        public void GetTypes_BaseTypeFiltering()
        {
            var service = new FixedTypeDiscoveryService(new[] { typeof(FixedTypeDiscoveryServiceTest), typeof(FixedTypeDiscoveryService) });

            Assert.That(service.GetTypes(typeof(ITypeDiscoveryService), false), Is.EqualTo(new[] { typeof(FixedTypeDiscoveryService) }));
        }
        public void GetTypes()
        {
            var service = new FixedTypeDiscoveryService(new[] { typeof(FixedTypeDiscoveryServiceTest) });

            Assert.That(service.GetTypes(null, false), Is.EqualTo(new[] { typeof(FixedTypeDiscoveryServiceTest) }));
        }