dotnet-installer/test/Microsoft.DotNet.Cli.Utils.Tests/GivenADefaultCommandResolver.cs

47 lines
1.4 KiB
C#
Raw Normal View History

// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using System.Linq;
using Xunit;
using Moq;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.ProjectModel;
using Microsoft.DotNet.Tools.Test.Utilities;
using Microsoft.Extensions.PlatformAbstractions;
using System.Threading;
using FluentAssertions;
using NuGet.Frameworks;
namespace Microsoft.DotNet.Cli.Utils.Tests
{
public class GivenADefaultCommandResolver
{
[Fact]
public void It_contains_resolvers_in_the_right_order()
{
var defaultCommandResolver = DefaultCommandResolverPolicy.Create();
var resolvers = defaultCommandResolver.OrderedCommandResolvers;
2016-03-24 16:36:05 +00:00
resolvers.Should().HaveCount(6);
resolvers.Select(r => r.GetType())
.Should()
.ContainInOrder(
new []{
2016-03-24 16:36:05 +00:00
typeof(MuxerCommandResolver),
typeof(RootedCommandResolver),
typeof(ProjectToolsCommandResolver),
2016-03-24 16:36:05 +00:00
typeof(AppBaseDllCommandResolver),
typeof(AppBaseCommandResolver),
typeof(PathCommandResolver)
});
}
}
}