From 460788c91ab8980b801d401dfdeb595f8ccde2ed Mon Sep 17 00:00:00 2001 From: John Beisner Date: Tue, 3 Jul 2018 16:23:35 +0000 Subject: [PATCH] Removing 'Locked-file' test; CLI:release/2.1.3xx (#9604) * Removing 'Locked-file' test: ItFailsInLessThanOneSecondWhenTheProjectAssetsJsonDoesNotExist --- README.md | 2 + .../GivenThatWeWantToReadLockFilesQuickly.cs | 49 ------------------- 2 files changed, 2 insertions(+), 49 deletions(-) delete mode 100644 test/Microsoft.DotNet.Cli.Utils.Tests/GivenThatWeWantToReadLockFilesQuickly.cs diff --git a/README.md b/README.md index 2e45c01fc..37c675614 100644 --- a/README.md +++ b/README.md @@ -216,3 +216,5 @@ License ------- By downloading the .zip you are agreeing to the terms in the project [EULA](https://aka.ms/dotnet-core-eula). + + diff --git a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenThatWeWantToReadLockFilesQuickly.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenThatWeWantToReadLockFilesQuickly.cs deleted file mode 100644 index 5b1300348..000000000 --- a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenThatWeWantToReadLockFilesQuickly.cs +++ /dev/null @@ -1,49 +0,0 @@ -// 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.Diagnostics; -using System.IO; -using FluentAssertions; -using Microsoft.DotNet.Cli; -using Microsoft.DotNet.Cli.Utils; -using Microsoft.DotNet.InternalAbstractions; -using Microsoft.DotNet.TestFramework; -using Microsoft.DotNet.Tools.Test.Utilities; -using NuGet.Frameworks; -using NuGet.ProjectModel; -using Xunit; - -namespace Microsoft.DotNet.Cli.Utils.Tests -{ - public class GivenThatWeWantToReadLockFilesQuickly : TestBase - { - [Fact] - public void ItFailsInLessThanOneSecondWhenTheProjectAssetsJsonDoesNotExist() - { - var testInstance = TestAssets.Get("TestAppWithProjDepTool") - .CreateInstance() - .WithSourceFiles(); - - var assetsFile = testInstance.Root.GetDirectory("obj").GetFile("project.assets.json").FullName; - var expectedMessage = string.Join( - Environment.NewLine, - string.Format(LocalizableStrings.FileNotFound, assetsFile), - LocalizableStrings.ProjectNotRestoredOrRestoreFailed); - - Action action = () => - { - var lockFile = new LockFileFormat() - .ReadWithLock(assetsFile) - .Result; - }; - - var stopWatch = Stopwatch.StartNew(); - - action.ShouldThrow().WithMessage(expectedMessage); - - stopWatch.Stop(); - stopWatch.ElapsedMilliseconds.Should().BeLessThan(1000); - } - } -}