public void LoadAndCheckAssembly_WithInValidPath_ReturnsBinderType() { var context = new DefaultBinderTypeRegistry.SearchingAssemblyLoadContext(); var path = Environment.CurrentDirectory + Path.DirectorySeparatorChar + "Steeltoe.Stream.FooBar.dll"; var result = DefaultBinderTypeRegistry.LoadAndCheckAssembly(context, path); Assert.Null(result); context.Unload(); }
public void LoadAndCheckAssembly_WithValidPath_ReturnsBinderType() { var context = new DefaultBinderTypeRegistry.SearchingAssemblyLoadContext(); var path = Environment.CurrentDirectory + Path.DirectorySeparatorChar + "Steeltoe.Stream.TestBinder.dll"; var result = DefaultBinderTypeRegistry.LoadAndCheckAssembly(context, path); Assert.Equal(path, result.AssemblyPath); Assert.Equal("Steeltoe.Stream.TestBinder.Startup, Steeltoe.Stream.TestBinder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null", result.ConfigureClass); Assert.Equal("testbinder", result.Name); context.Unload(); }