Add support for reading DepedencyContext from deps file
This commit is contained in:
parent
7407a898e0
commit
62284943fc
18 changed files with 438 additions and 20 deletions
|
@ -4,6 +4,7 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using Microsoft.DotNet.Cli.Utils;
|
||||
using Microsoft.DotNet.TestFramework;
|
||||
using Microsoft.DotNet.Tools.Test.Utilities;
|
||||
using FluentAssertions;
|
||||
using Xunit;
|
||||
|
@ -146,6 +147,26 @@ namespace Microsoft.DotNet.Tools.Compiler.Tests
|
|||
result.StdOut.Should().Contain("MyNamespace.Util");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void EmbeddedDependencyContextIsValidOnBuild()
|
||||
{
|
||||
var testProjectPath = Path.Combine(RepoRoot, "TestAssets", "TestProjects", "DependencyContextValidator", "TestApp");
|
||||
var testProject = Path.Combine(testProjectPath, "project.json");
|
||||
|
||||
var runCommand = new RunCommand(testProject);
|
||||
runCommand.Execute().Should().Pass();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DepsDependencyContextIsValidOnBuild()
|
||||
{
|
||||
var testProjectPath = Path.Combine(RepoRoot, "TestAssets", "TestProjects", "DependencyContextValidator", "TestAppDeps");
|
||||
var testProject = Path.Combine(testProjectPath, "project.json");
|
||||
|
||||
var runCommand = new RunCommand(testProject);
|
||||
runCommand.Execute().Should().Pass();
|
||||
}
|
||||
|
||||
private void CopyProjectToTempDir(string projectDir, TempDirectory tempDir)
|
||||
{
|
||||
// copy all the files to temp dir
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue