a6bc22e499
* remove reference to TestAssetsManager in dotnet-add-reference * remove TestAssetsManager dependency from dotnet-build * remove TAM ref from dotnet-list-reference * remove TAM dependency from dotnet-msbuild * remove TAM dependency from ProjectJsonMigration tests * remove TAM dependency from dotnet.Tests * remove TAM dependency from dotnet-new.Tests * remove TAM from dotnet-pack.Tests * remove TAM from dotnet-publish.Tests * remove TAM from dotnet-restore.Tests * remove TAM dependency from dotnet-remove-reference.Tests * remove TAM dependency from dotnet-run.Tests * remove TAM dependency from dotnet-test.Tests * remove TAM dependency from Microsoft.DotNet.Cli.Utils.Tests * remove TAM from TestBase * remove TAM * remove newly introduced dependency on TAM
35 lines
1.2 KiB
C#
35 lines
1.2 KiB
C#
// 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 testInstance = TestAssets.Get("NonRestoredTestProjects", "TestProjectWithUnresolvedPlatformDependency")
|
||
.CreateInstance()
|
||
.WithSourceFiles()
|
||
.Root.FullName;
|
||
|
||
new RestoreCommand()
|
||
.WithWorkingDirectory(testInstance)
|
||
.ExecuteWithCapturedOutput("/p:SkipInvalidConfigurations=true")
|
||
.Should()
|
||
.Fail();
|
||
|
||
new DotnetCommand()
|
||
.WithWorkingDirectory(testInstance)
|
||
.ExecuteWithCapturedOutput("crash")
|
||
.Should().Fail()
|
||
.And.HaveStdErrContaining("No executable found matching command \"dotnet-crash\"");
|
||
}
|
||
}
|
||
}
|