private static IEnumerable <Type> LoadBehaviourTypes(Assembly loadedAss) { EngineScriptComponentLocator locator = new EngineScriptComponentLocator(loadedAss); //Should return types that are EngineScriptComponents return(locator.LoadTypes()); }
[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()); }
private static IEnumerable<Type> LoadBehaviourTypes(Assembly loadedAss) { EngineScriptComponentLocator locator = new EngineScriptComponentLocator(loadedAss); //Should return types that are EngineScriptComponents return locator.LoadTypes(); }