This repository has been archived on 2025-09-07. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
dotnet-installer/test/Microsoft.Extensions.DependencyModel.Tests/RuntimeAssemblyTests.cs

28 lines
748 B
C#
Raw Normal View History

2016-03-08 16:46:50 -08:00
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");
}
}
}