Exemple #1
0
		public void CreateHandlersWithSingleAssemblyCtor()
		{
			
			var r = new ReflectedTypeRegistry(Assembly.GetExecutingAssembly());
			
			Assert.NotNull(r);
			Assert.Greater(r.TypeHandlers.Count,0);
			Assert.AreEqual(r.TypeHandlers.Count,2);
						
			foreach (var h in r.TypeHandlers)
			{
				Assert.NotNull(h.Key);
				Assert.NotNull(h.Value);
						
			}

		}
Exemple #2
0
		public void CreateHandlersWithDefaultCtor()
		{
			
			var r = new ReflectedTypeRegistry();
			
			Assert.NotNull(r);
			Assert.Greater(r.TypeHandlers.Count,0);
			Assert.AreEqual(r.TypeHandlers.Count,2);
						
			foreach (var h in r.TypeHandlers)
			{
				Assert.NotNull(h.Key);
				Assert.NotNull(h.Value);
						
				
			}

		}
Exemple #3
0
		public void CreateHandlersWithMultiAssemblyCtor()
		{
			var assemblies = new List<Assembly>();
			assemblies.Add(Assembly.GetExecutingAssembly());
			
			var r = new ReflectedTypeRegistry(assemblies);
			
			Assert.NotNull(r);
			Assert.Greater(r.TypeHandlers.Count,0);
			Assert.AreEqual(r.TypeHandlers.Count,2);
						
			foreach (var h in r.TypeHandlers)
			{
				Assert.NotNull(h.Key);
				Assert.NotNull(h.Value);
						
			}

		}
Exemple #4
0
		public void CreateHandlersWithBadArgument()
		{
			Assembly a = Assembly.GetAssembly(new object().GetType());
			var r = new ReflectedTypeRegistry(a);
		}
Exemple #5
0
		public void CreateHandlersWithNullArgument()
		{
			Assembly a = null;
			var r = new ReflectedTypeRegistry(a);
		}