Created
November 13, 2014 06:55
-
-
Save DevJohnC/caced52032461d294ce9 to your computer and use it in GitHub Desktop.
IKVM Reflection test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Tests that the ManifestReader isn't loading assemblies. | |
/// </summary> | |
[TestMethod] | |
public void ManifestReaderDoesntLoadAssemblies() | |
{ | |
var didFail = false; | |
AppDomain.CurrentDomain.AssemblyLoad += (sender, args) => | |
{ | |
if (args.LoadedAssembly.FullName.IndexOf("SimplePlugin") != -1) | |
didFail = true; | |
}; | |
var reader = new ManifestReader("../../../../ExamplePlugins/SimplePlugin/bin/Debug/SimplePlugin.dll"); | |
var manifest = reader.ReadManifestAttribute(); | |
if (didFail) | |
Assert.Fail("ManifestReader caused an assembly to load."); | |
if (manifest == null) | |
Assert.Fail("Failed to read manifest."); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment