From 9bddb5bac741c9be6ae764c10e94dce93b3a8447 Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Thu, 8 Dec 2016 20:06:55 -0800 Subject: [PATCH] Addressing code review comments. --- .../project.json | 2 +- .../GivenAProjectMigrator.cs | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) rename TestAssets/{TestProjects => NonRestoredTestProjects}/TestLibraryWithProjectFileWithoutFrameworks/project.json (98%) diff --git a/TestAssets/TestProjects/TestLibraryWithProjectFileWithoutFrameworks/project.json b/TestAssets/NonRestoredTestProjects/TestLibraryWithProjectFileWithoutFrameworks/project.json similarity index 98% rename from TestAssets/TestProjects/TestLibraryWithProjectFileWithoutFrameworks/project.json rename to TestAssets/NonRestoredTestProjects/TestLibraryWithProjectFileWithoutFrameworks/project.json index 9e6a2436c..d685d1947 100644 --- a/TestAssets/TestProjects/TestLibraryWithProjectFileWithoutFrameworks/project.json +++ b/TestAssets/NonRestoredTestProjects/TestLibraryWithProjectFileWithoutFrameworks/project.json @@ -5,4 +5,4 @@ "type": "build" } } -} \ No newline at end of file +} diff --git a/test/Microsoft.DotNet.ProjectJsonMigration.Tests/GivenAProjectMigrator.cs b/test/Microsoft.DotNet.ProjectJsonMigration.Tests/GivenAProjectMigrator.cs index a542088ec..d15de0265 100644 --- a/test/Microsoft.DotNet.ProjectJsonMigration.Tests/GivenAProjectMigrator.cs +++ b/test/Microsoft.DotNet.ProjectJsonMigration.Tests/GivenAProjectMigrator.cs @@ -80,9 +80,10 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests [Fact] public void ItHasErrorWhenMigratingAProjectJsonWithoutAFrameworks() { - var testAppName = "TestLibraryWithProjectFileWithoutFrameworks"; - var testInstance = TestAssets.Get(testAppName) - .CreateInstance(testAppName) + var testInstance = TestAssets.Get( + "NonRestoredTestProjects", + "TestLibraryWithProjectFileWithoutFrameworks") + .CreateInstance() .WithSourceFiles(); var testProjectDirectory = testInstance.Root.FullName; @@ -98,9 +99,9 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests var projectReport = report.ProjectMigrationReports.First(); - var errorMessage = projectReport.Errors.First().GetFormattedErrorMessage(); - errorMessage.Should().Contain("MIGRATE1013::No Project:"); - errorMessage.Should().Contain($"The project.json specifies no target frameworks in {testProjectDirectory}"); + projectReport.Errors.First().GetFormattedErrorMessage() + .Should().Contain("MIGRATE1013::No Project:") + .And.Contain($"The project.json specifies no target frameworks in {testProjectDirectory}"); } private IEnumerable EnumerateFilesWithRelativePath(string testProjectDirectory)