public void TestInitialize() { TestsHelper.SetupLogger(); _configurationMockHelper = new ConfigurationMockHelper(new string[] { "DynamicallyLoadedDlls" }, new string[] { "Plugin1", "Plugin2" }, new ConfigurationMockHelper.AssemblyInfo[] { new ConfigurationMockHelper.AssemblyInfo(OroptimizerSharedAssemblyAlias, "OROptimizer.Shared", Helpers.TestsEntryAssemblyFolder), new ConfigurationMockHelper.AssemblyInfo(IoCConfigAssemblyAlias, "IoC.Configuration", Helpers.TestsEntryAssemblyFolder), new ConfigurationMockHelper.AssemblyInfo(IoCConfigurationTestsAssemblyAlias, "IoC.Configuration.Tests", Helpers.TestsEntryAssemblyFolder), new ConfigurationMockHelper.AssemblyInfo(SharedTestServicesAssemblyAlias, "TestProjects.SharedServices", Helpers.TestsEntryAssemblyFolder), new ConfigurationMockHelper.AssemblyInfo(MsCoreLibAssemblyAlias, typeof(int).Assembly.GetName().Name, Path.GetDirectoryName(typeof(int).Assembly.Location)), new ConfigurationMockHelper.AssemblyInfo(DynamicallyLoadedAssembly1Alias, "TestProjects.DynamicallyLoadedAssembly1", Path.Combine(TestFilesFolder, "DynamicallyLoadedDlls")), new ConfigurationMockHelper.AssemblyInfo(DynamicallyLoadedAssembly2Alias, "TestProjects.DynamicallyLoadedAssembly2", Path.Combine(TestFilesFolder, "DynamicallyLoadedDlls")), new ConfigurationMockHelper.AssemblyInfo(TestPluginAssembly1Alias, "TestProjects.TestPluginAssembly1", Path.Combine(TestFilesFolder, "PluginDlls", "Plugin1")), new ConfigurationMockHelper.AssemblyInfo(TestPluginAssembly2Alias, "TestProjects.TestPluginAssembly2", Path.Combine(TestFilesFolder, "PluginDlls", "Plugin2")) }); _configurationMockHelper.ConfigureTypeDefinitions(new ConfigurationMockHelper.TypeDefinitionInfo[] { new ConfigurationMockHelper.TypeDefinitionInfo(TypeDef1, typeof(IInterface1).FullName), new ConfigurationMockHelper.TypeDefinitionInfo(TypeDef2, "System.Collections.Generic.IEnumerable[SharedServices.Interfaces.IInterface1]"), }); var pluginAssemblyTypeUsageValidatorMock = new Mock <IPluginAssemblyTypeUsageValidator>(); pluginAssemblyTypeUsageValidatorMock.Setup(x => x.Validate(It.IsAny <IConfigurationFileElement>(), It.IsAny <ITypeInfo>())); _assemblyLocator = new AssemblyLocator(() => _configurationMockHelper.ConfigurationMock.Object, Helpers.TestsEntryAssemblyFolder); _typeHelper = new TypeHelper(_assemblyLocator, new TypeParser(), pluginAssemblyTypeUsageValidatorMock.Object); }
public static void ClassInitialize() { TestsHelper.SetupLogger(); TestsSharedLibrary.Diagnostics.Log.Log4Tests.LogLevel = TestsSharedLibrary.Diagnostics.Log.LogLevel.Debug; }