Example #1
0
        public void ShouldLoad_Assembly_GetLoadableTypes()
        {
            var type     = GetType();
            var assembly = type.Assembly;
            var loader   = new DefaultAssemblyLoader();
            var types    = loader.GetLoadableTypes(assembly);

            Assert.IsNotNull(types);
            Assert.Greater(types.Count(), 1);
            Assert.IsTrue(types.Contains(GetType()));
        }
Example #2
0
        public void ShouldLoad_Assembly_GetLoadableTypes_Generic()
        {
            var type         = GetType();
            var assembly     = type.Assembly;
            var loader       = new DefaultAssemblyLoader();
            var testBaseType = typeof(TestBase);
            var types        = loader.GetLoadableTypes(assembly, testBaseType);

            Assert.IsNotNull(types);
            Assert.Greater(types.Count(), 1);
            Assert.IsTrue(types.Contains(GetType()));
            Assert.IsTrue(types.All(testBaseType.IsAssignableFrom));
        }