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); } }
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); } }
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); } }
public void CreateHandlersWithBadArgument() { Assembly a = Assembly.GetAssembly(new object().GetType()); var r = new ReflectedTypeRegistry(a); }
public void CreateHandlersWithNullArgument() { Assembly a = null; var r = new ReflectedTypeRegistry(a); }