Beispiel #1
0
        public void GetTypesFromCached()
        {
            var nonCached = typeCache.GetTypes("hello", GetTestAssembly, (a) => new[] { typeof(TypeCacheTests) }).ToArray();
            typeCache = CreateTypeCache();
            var cached = typeCache.GetTypes("hello", GetTestAssembly, (a) => null).ToArray();

            cached.Single().ShouldBe(typeof(TypeCacheTests));
        }
		public void SetUp()
		{
			assemblyCache = new TypeCache(new N2.Persistence.BasicTemporaryFileHelper(new ThreadContext()));
			var config = new N2.Configuration.EngineSection();
			config.Assemblies.SkipLoadingPattern = "nothing";
			config.Assemblies.Remove(new N2.Configuration.AssemblyElement("N2.Management"));
			config.Assemblies.EnableTypeCache = false;
			typeFinder = new WebAppTypeFinder(assemblyCache, config);
		}
Beispiel #3
0
 public void SetUp()
 {
     typeCache = CreateTypeCache();
     typeCache.Clear();
 }