2016-04-21 20:41:22 +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.
|
|
|
|
|
|
2016-04-28 23:30:32 +00:00
|
|
|
|
using FluentAssertions;
|
2016-04-21 20:41:22 +00:00
|
|
|
|
using Microsoft.DotNet.Tools.Test.Utilities;
|
|
|
|
|
using Xunit;
|
|
|
|
|
|
2016-10-28 01:46:43 +00:00
|
|
|
|
namespace Microsoft.DotNet.BindingRedirects.Tests
|
2016-04-21 20:41:22 +00:00
|
|
|
|
{
|
|
|
|
|
public class GivenAnAppWithRedirectsAndExecutableDependency : TestBase, IClassFixture<TestSetupFixture>
|
|
|
|
|
{
|
2016-04-25 17:56:05 +00:00
|
|
|
|
public string _appWithConfigProjectRoot;
|
|
|
|
|
public string _appWithoutConfigProjectRoot;
|
2016-04-21 20:41:22 +00:00
|
|
|
|
|
|
|
|
|
public GivenAnAppWithRedirectsAndExecutableDependency(TestSetupFixture testSetup)
|
|
|
|
|
{
|
2016-11-14 22:26:03 +00:00
|
|
|
|
_appWithConfigProjectRoot = testSetup.AppWithConfigProjectRoot;
|
|
|
|
|
_appWithoutConfigProjectRoot = testSetup.AppWithoutConfigProjectRoot;
|
2016-04-21 20:41:22 +00:00
|
|
|
|
}
|
2016-04-25 17:56:05 +00:00
|
|
|
|
|
2016-10-28 01:46:43 +00:00
|
|
|
|
[Fact(Skip="https://github.com/dotnet/cli/issues/4514")]
|
2016-04-25 17:56:05 +00:00
|
|
|
|
public void Tool_Command_Runs_Executable_Dependency_For_App_With_Config()
|
|
|
|
|
{
|
2016-11-14 22:26:03 +00:00
|
|
|
|
new DependencyToolInvokerCommand()
|
|
|
|
|
.WithWorkingDirectory(_appWithConfigProjectRoot)
|
|
|
|
|
.ExecuteWithCapturedOutput("desktop-binding-redirects", "net46", "")
|
|
|
|
|
.Should().Pass().And.NotHaveStdErr();
|
2016-04-25 17:56:05 +00:00
|
|
|
|
}
|
|
|
|
|
|
2016-10-28 01:46:43 +00:00
|
|
|
|
[Fact(Skip="https://github.com/dotnet/cli/issues/4514")]
|
2016-04-25 17:56:05 +00:00
|
|
|
|
public void Tool_Command_Runs_Executable_Dependency_For_App_Without_Config()
|
|
|
|
|
{
|
2016-11-14 22:26:03 +00:00
|
|
|
|
new DependencyToolInvokerCommand()
|
|
|
|
|
.WithWorkingDirectory(_appWithoutConfigProjectRoot)
|
|
|
|
|
.ExecuteWithCapturedOutput("desktop-binding-redirects", "net46", "")
|
|
|
|
|
.Should().Pass().And.NotHaveStdErr();
|
2016-04-25 17:56:05 +00:00
|
|
|
|
}
|
2016-04-21 20:41:22 +00:00
|
|
|
|
}
|
|
|
|
|
}
|