dotnet-installer/test/Microsoft.Extensions.DependencyModel.Tests/RuntimeAssemblyTests.cs
2016-03-09 14:11:43 -08:00

27 lines
748 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using FluentAssertions;
using Xunit;
namespace Microsoft.Extensions.DependencyModel.Tests
{
public class RuntimeAssemblyTests
{
[Fact]
public void UsesFileNameAsAssemblyNameInCreate()
{
var assembly = RuntimeAssembly.Create("path/to/System.Collections.dll");
assembly.Name.Name.Should().Be("System.Collections");
}
[Fact]
public void TrimsDotNiFromDllNames()
{
var assembly = RuntimeAssembly.Create("path/to/System.Collections.ni.dll");
assembly.Name.Name.Should().Be("System.Collections");
}
}
}