dotnet-installer/test/dotnet.Tests/GivenThatDotNetRunsCommands.cs
Piotr Puszkiewicz 6fcbefa4f7 [WIP] Removes *3 verbs, making msbuild the driver (#4456)
Removes *3 verbs, making msbuild the driver
2016-10-27 18:46:43 -07:00

34 lines
1.2 KiB
C#
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 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.IO;
using FluentAssertions;
using Microsoft.DotNet.Tools.Test.Utilities;
using Xunit;
namespace Microsoft.DotNet.Tests
{
public class GivenThatDotNetRunsCommands : TestBase
{
[Fact]
public void UnresolvedPlatformReferencesFailAsExpected()
{
var testAssetsManager = GetTestGroupTestAssetsManager("NonRestoredTestProjects");
var testInstance = testAssetsManager.CreateTestInstance("TestProjectWithUnresolvedPlatformDependency");
new RestoreCommand()
.WithWorkingDirectory(testInstance.TestRoot)
.ExecuteWithCapturedOutput("/p:SkipInvalidConfigurations=true")
.Should()
.Fail();
new DotnetCommand()
.WithWorkingDirectory(testInstance.TestRoot)
.ExecuteWithCapturedOutput("crash")
.Should().Fail()
.And.HaveStdErrContaining("No executable found matching command \"dotnet-crash\"");
}
}
}