public void TestDotNetAssembly() { var testAssembly = typeof(UnitTestSampleAssembly.Class1 <, ,>).Assembly; var loadContext = new MrLoadContext(); loadContext.AssemblyPathFromName = (string assemblyName) => { if (testAssembly.GetName().Name == assemblyName) { return(testAssembly.Location); } return(null); }; loadContext.LoadFromAssemblyName(testAssembly.GetName().Name); loadContext.FinishLoading(); TestMethodHelper(loadContext, Properties.Resources.ExpectedOutput); }
MrLoadContext LoadDotNetTestAssembly() { var testAssembly = typeof(UnitTestSampleAssembly.Class1 <, ,>).Assembly; var loadContext = new MrLoadContext(); loadContext.AssemblyPathFromName = (string assemblyName) => { if (testAssembly.GetName().Name == assemblyName) { return(testAssembly.Location); } return(null); }; loadContext.LoadFromAssemblyName(testAssembly.GetName().Name); loadContext.FinishLoading(); return(loadContext); }