2016-02-25 00:05:55 +00:00
|
|
|
// 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.Linq;
|
|
|
|
using FluentAssertions;
|
2016-04-28 23:30:32 +00:00
|
|
|
using Microsoft.DotNet.Tools.Test.Utilities;
|
|
|
|
using Xunit;
|
2016-02-25 00:05:55 +00:00
|
|
|
|
|
|
|
namespace Microsoft.DotNet.Cli.Utils.Tests
|
|
|
|
{
|
|
|
|
public class GivenADefaultCommandResolver
|
|
|
|
{
|
|
|
|
[Fact]
|
|
|
|
public void It_contains_resolvers_in_the_right_order()
|
|
|
|
{
|
2016-03-07 19:50:52 +00:00
|
|
|
var defaultCommandResolver = DefaultCommandResolverPolicy.Create();
|
2016-02-25 00:05:55 +00:00
|
|
|
|
|
|
|
var resolvers = defaultCommandResolver.OrderedCommandResolvers;
|
|
|
|
|
2016-10-11 00:13:46 +00:00
|
|
|
resolvers.Should().HaveCount(7);
|
2016-02-25 00:05:55 +00:00
|
|
|
|
|
|
|
resolvers.Select(r => r.GetType())
|
|
|
|
.Should()
|
|
|
|
.ContainInOrder(
|
|
|
|
new []{
|
2016-03-24 16:36:05 +00:00
|
|
|
typeof(MuxerCommandResolver),
|
2016-02-25 00:05:55 +00:00
|
|
|
typeof(RootedCommandResolver),
|
2016-10-11 00:13:46 +00:00
|
|
|
typeof(ProjectToolsCommandResolver),
|
2016-03-24 16:36:05 +00:00
|
|
|
typeof(AppBaseDllCommandResolver),
|
2016-02-25 00:05:55 +00:00
|
|
|
typeof(AppBaseCommandResolver),
|
2016-08-26 05:53:04 +00:00
|
|
|
typeof(PathCommandResolver),
|
|
|
|
typeof(PublishedPathCommandResolver)
|
2016-02-25 00:05:55 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|