Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Commit

Permalink
Modify test to look for assembly names rather than absolute paths
Browse files Browse the repository at this point in the history
This workaround an issue \ bug with the results returned by DependencyContext where
the path uses a mix of forward and back slashes which causes comparison with Assembly.Location that only
uses forward slashes to fail.
  • Loading branch information
pranavkm committed May 26, 2016
1 parent 42dd449 commit abf9319
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System.IO;
using System.Linq;
using System.Reflection;
using Xunit;
Expand Down Expand Up @@ -60,7 +61,9 @@ public void GetReferencePaths_ReturnsReferencesFromDependencyContext_IfPreserveC

// Assert
Assert.Contains(assembly.Location, references);
Assert.Contains(typeof(AssemblyPart).GetTypeInfo().Assembly.Location, references);
Assert.Contains(
typeof(AssemblyPart).GetTypeInfo().Assembly.GetName().Name,
references.Select(Path.GetFileNameWithoutExtension));
}

[Fact]
Expand Down

0 comments on commit abf9319

Please sign in to comment.