Ejemplo n.º 1
0
        private static IEnumerable <Type> LoadBehaviourTypes(Assembly loadedAss)
        {
            EngineScriptComponentLocator locator = new EngineScriptComponentLocator(loadedAss);

            //Should return types that are EngineScriptComponents
            return(locator.LoadTypes());
        }
Ejemplo n.º 2
0
        [TestCase(typeof(TestClass5), true)]                         //classes that inherit from abstracts should be found
        public static void Test_EngineScriptComponentLocator_Load_Types(Type typeToTest, bool shouldContain)
        {
            //arrange
            EngineScriptComponentLocator locator = new EngineScriptComponentLocator(Assembly.GetExecutingAssembly());

            //act
            IEnumerable <Type> types = locator.LoadTypes().ToList();

            //assert
            Assert.AreEqual(shouldContain, types.Contains(typeToTest), "Expected types to contain Type: {0}", typeToTest.ToString());
        }
        public static void Test_EngineScriptComponentLocator_Load_Types(Type typeToTest, bool shouldContain)
        {
            //arrange
            EngineScriptComponentLocator locator = new EngineScriptComponentLocator(Assembly.GetExecutingAssembly());

            //act
            IEnumerable<Type> types = locator.LoadTypes().ToList();

            //assert
            Assert.AreEqual(shouldContain, types.Contains(typeToTest), "Expected types to contain Type: {0}", typeToTest.ToString());
        }
Ejemplo n.º 4
0
		private static IEnumerable<Type> LoadBehaviourTypes(Assembly loadedAss)
		{
			EngineScriptComponentLocator locator = new EngineScriptComponentLocator(loadedAss);

			//Should return types that are EngineScriptComponents
			return locator.LoadTypes();
		}