Shorten test asset names

This commit is contained in:
Piotr Puszkiewicz 2016-08-18 10:17:58 -07:00
parent c3971fc100
commit 3194ec1c3a
17 changed files with 14 additions and 14 deletions

View file

@ -21,7 +21,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
var configuration = "Debug"; var configuration = "Debug";
var testAssetManager = new TestAssetsManager(Path.Combine(RepoRoot, "TestAssets", "DesktopTestProjects")); var testAssetManager = new TestAssetsManager(Path.Combine(RepoRoot, "TestAssets", "DesktopTestProjects"));
var testInstance = testAssetManager.CreateTestInstance("AppWithDirectDependencyDesktopAndPortable") var testInstance = testAssetManager.CreateTestInstance("AppWithDirectDepDesktopAndPortable")
.WithLockFiles(); .WithLockFiles();
var buildCommand = new BuildCommand( var buildCommand = new BuildCommand(
@ -52,7 +52,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
var configuration = "Debug"; var configuration = "Debug";
var testAssetManager = new TestAssetsManager(Path.Combine(RepoRoot, "TestAssets", "DesktopTestProjects")); var testAssetManager = new TestAssetsManager(Path.Combine(RepoRoot, "TestAssets", "DesktopTestProjects"));
var testInstance = testAssetManager.CreateTestInstance("AppWithDirectDependencyDesktopAndPortable") var testInstance = testAssetManager.CreateTestInstance("AppWithDirectDepDesktopAndPortable")
.WithLockFiles(); .WithLockFiles();
var buildCommand = new BuildCommand( var buildCommand = new BuildCommand(
@ -83,7 +83,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
var configuration = "Release"; var configuration = "Release";
var testAssetManager = new TestAssetsManager(Path.Combine(RepoRoot, "TestAssets", "DesktopTestProjects")); var testAssetManager = new TestAssetsManager(Path.Combine(RepoRoot, "TestAssets", "DesktopTestProjects"));
var testInstance = testAssetManager.CreateTestInstance("AppWithDirectDependencyDesktopAndPortable") var testInstance = testAssetManager.CreateTestInstance("AppWithDirectDepDesktopAndPortable")
.WithLockFiles(); .WithLockFiles();
var buildCommand = new BuildCommand( var buildCommand = new BuildCommand(
@ -114,7 +114,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
var configuration = "Release"; var configuration = "Release";
var testAssetManager = new TestAssetsManager(Path.Combine(RepoRoot, "TestAssets", "DesktopTestProjects")); var testAssetManager = new TestAssetsManager(Path.Combine(RepoRoot, "TestAssets", "DesktopTestProjects"));
var testInstance = testAssetManager.CreateTestInstance("AppWithDirectDependencyDesktopAndPortable") var testInstance = testAssetManager.CreateTestInstance("AppWithDirectDepDesktopAndPortable")
.WithLockFiles(); .WithLockFiles();
var buildCommand = new BuildCommand( var buildCommand = new BuildCommand(
@ -145,7 +145,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
var configuration = "Debug"; var configuration = "Debug";
var testAssetManager = new TestAssetsManager(Path.Combine(RepoRoot, "TestAssets", "TestProjects")); var testAssetManager = new TestAssetsManager(Path.Combine(RepoRoot, "TestAssets", "TestProjects"));
var testInstance = testAssetManager.CreateTestInstance("AppWithDirectDependencyWithOutputName") var testInstance = testAssetManager.CreateTestInstance("AppWithDirectDepWithOutputName")
.WithLockFiles(); .WithLockFiles();
var buildCommand = new BuildCommand( var buildCommand = new BuildCommand(

View file

@ -15,7 +15,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
public class GivenAProjectDependenciesCommandResolver : TestBase public class GivenAProjectDependenciesCommandResolver : TestBase
{ {
private const string TestProjectName = "AppWithDirectDependency"; private const string TestProjectName = "AppWithDirectDep";
[Fact] [Fact]
public void It_returns_null_when_CommandName_is_null() public void It_returns_null_when_CommandName_is_null()

View file

@ -14,7 +14,7 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
[Fact] [Fact]
public void PublishExcludesBuildDependencies() public void PublishExcludesBuildDependencies()
{ {
var testInstance = TestAssetsManager.CreateTestInstance("AppWithDirectDependencyAndTypeBuild") var testInstance = TestAssetsManager.CreateTestInstance("AppWithDirectDepAndTypeBuild")
.WithLockFiles(); .WithLockFiles();
var publishCommand = new PublishCommand(testInstance.TestRoot); var publishCommand = new PublishCommand(testInstance.TestRoot);
@ -37,7 +37,7 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
// Check the deps file // Check the deps file
var reader = new DependencyContextJsonReader(); var reader = new DependencyContextJsonReader();
DependencyContext context; DependencyContext context;
using (var file = File.OpenRead(Path.Combine(publishDir.FullName, "AppWithDirectDependencyAndTypeBuild.deps.json"))) using (var file = File.OpenRead(Path.Combine(publishDir.FullName, "AppWithDirectDepAndTypeBuild.deps.json")))
{ {
context = reader.Read(file); context = reader.Read(file);
} }

View file

@ -23,7 +23,7 @@ namespace Microsoft.DotNet.Tests
get get
{ {
var rid = RuntimeEnvironmentRidExtensions.GetLegacyRestoreRuntimeIdentifier(); var rid = RuntimeEnvironmentRidExtensions.GetLegacyRestoreRuntimeIdentifier();
var projectOutputPath = $"AppWithDirectDependencyDesktopAndPortable\\bin\\Debug\\net451\\{rid}\\dotnet-desktop-and-portable.exe"; var projectOutputPath = $"AppWithDirectDepDesktopAndPortable\\bin\\Debug\\net451\\{rid}\\dotnet-desktop-and-portable.exe";
return new[] return new[]
{ {
new object[] { "CoreFX", ".NETCoreApp,Version=v1.0", "lib\\netcoreapp1.0\\dotnet-desktop-and-portable.dll", true }, new object[] { "CoreFX", ".NETCoreApp,Version=v1.0", "lib\\netcoreapp1.0\\dotnet-desktop-and-portable.dll", true },
@ -47,7 +47,7 @@ namespace Microsoft.DotNet.Tests
} }
[Theory] [Theory]
[InlineData("AppWithDirectAndToolDependency")] [InlineData("AppWithDirectAndToolDep")]
[InlineData("AppWithToolDependency")] [InlineData("AppWithToolDependency")]
public void TestProjectToolIsAvailableThroughDriver(string appName) public void TestProjectToolIsAvailableThroughDriver(string appName)
{ {
@ -74,7 +74,7 @@ namespace Microsoft.DotNet.Tests
public void CanInvokeToolWhosePackageNameIsDifferentFromDllName() public void CanInvokeToolWhosePackageNameIsDifferentFromDllName()
{ {
var testInstance = TestAssetsManager var testInstance = TestAssetsManager
.CreateTestInstance("AppWithDependencyOnToolWithOutputName") .CreateTestInstance("AppWithDepOnToolWithOutputName")
.WithLockFiles(); .WithLockFiles();
var appDirectory = testInstance.Path; var appDirectory = testInstance.Path;
@ -96,7 +96,7 @@ namespace Microsoft.DotNet.Tests
public void CanInvokeToolFromDirectDependenciesIfPackageNameDifferentFromToolName() public void CanInvokeToolFromDirectDependenciesIfPackageNameDifferentFromToolName()
{ {
var testInstance = TestAssetsManager var testInstance = TestAssetsManager
.CreateTestInstance("AppWithDirectDependencyWithOutputName") .CreateTestInstance("AppWithDirectDepWithOutputName")
.WithBuildArtifacts() .WithBuildArtifacts()
.WithLockFiles(); .WithLockFiles();
@ -127,7 +127,7 @@ namespace Microsoft.DotNet.Tests
} }
var testInstance = _desktopTestAssetsManager var testInstance = _desktopTestAssetsManager
.CreateTestInstance("AppWithDirectDependencyDesktopAndPortable", identifier: identifier) .CreateTestInstance("AppWithDirectDepDesktopAndPortable", identifier: identifier)
.WithBuildArtifacts() .WithBuildArtifacts()
.WithLockFiles(); .WithLockFiles();
@ -192,7 +192,7 @@ namespace Microsoft.DotNet.Tests
public void TestProjectDependencyIsNotAvailableThroughDriver() public void TestProjectDependencyIsNotAvailableThroughDriver()
{ {
var testInstance = TestAssetsManager var testInstance = TestAssetsManager
.CreateTestInstance("AppWithDirectDependency") .CreateTestInstance("AppWithDirectDep")
.WithLockFiles(); .WithLockFiles();
var appDirectory = testInstance.Path; var appDirectory = testInstance.Path;