public static void TryGetFileName(Type type) { #if NETCOREAPP3_0 Assert.Inconclusive("Fix later."); #endif Assert.AreEqual(true, ReferenceAssembly.TryGet(Path.GetFileNameWithoutExtension(type.Assembly.Location), out var metadataReference)); StringAssert.Contains("Reference Assemblies", ((PortableExecutableReference?)metadataReference) !.FilePath); }
public void TryGet(Type type) { Assert.AreEqual(true, ReferenceAssembly.TryGet(type.Assembly, out var metadataReference)); StringAssert.Contains("Reference Assemblies", ((PortableExecutableReference)metadataReference).FilePath); Assert.AreEqual(true, ReferenceAssembly.TryGet(type.Assembly.Location, out metadataReference)); StringAssert.Contains("Reference Assemblies", ((PortableExecutableReference)metadataReference).FilePath); Assert.AreEqual(true, ReferenceAssembly.TryGet(Path.GetFileNameWithoutExtension(type.Assembly.Location), out metadataReference)); StringAssert.Contains("Reference Assemblies", ((PortableExecutableReference)metadataReference).FilePath); }