Fixing the failing test by using a package that is not part of the asp.net runtime.

This commit is contained in:
Livar Cunha 2017-05-02 12:37:29 -07:00
parent 5a6efef0e2
commit 9387702b7a
7 changed files with 16 additions and 22 deletions

View file

@ -1,3 +0,0 @@
<StoreArtifacts>
<Package Id="Newtonsoft.Json" Version ="9.0.1"/>
</StoreArtifacts>

View file

@ -1,5 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version ="9.0.1"/>
</ItemGroup>
</Project>

View file

@ -6,6 +6,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NewtonSoft.Json" Version="9.0.1" />
<PackageReference Include="NuGet.Configuration" Version="4.3.0-beta1-2418" />
</ItemGroup>
</Project>

View file

@ -3,20 +3,14 @@
using System;
using System.Collections;
using Newtonsoft.Json.Linq;
using NuGet.Configuration;
class Program
{
public static void Main(string[] args)
{
ArrayList argList = new ArrayList(args);
JObject jObject = new JObject();
var settingValue = new SettingValue("key", "value", false);
foreach (string arg in argList)
{
jObject[arg] = arg;
}
Console.WriteLine(jObject.ToString());
Console.WriteLine(settingValue.Key);
}
}

View file

@ -0,0 +1,3 @@
<StoreArtifacts>
<Package Id="NuGet.Configuration" Version ="4.3.0-beta1-2418"/>
</StoreArtifacts>

View file

@ -0,0 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<PackageReference Include="NuGet.Configuration" Version ="4.3.0-beta1-2418"/>
</ItemGroup>
</Project>

View file

@ -70,9 +70,9 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
[Fact]
public void AppFailsDueToMissingCache()
{
var testAppName = "NewtonSoftDependentProject";
var profileProjectName = "NewtonsoftProfile";
var targetManifestFileName = "NewtonsoftFilterProfile.xml";
var testAppName = "NuGetConfigDependentProject";
var profileProjectName = "NuGetConfigProfile";
var targetManifestFileName = "NuGetConfigFilterProfile.xml";
var testInstance = TestAssets.Get(testAppName)
.CreateInstance()
@ -102,7 +102,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
new DotnetCommand()
.ExecuteWithCapturedOutput(outputDll)
.Should().Fail()
.And.HaveStdErrContaining($"Error: assembly specified in the dependencies manifest was not found probably due to missing runtime store associated with {targetManifestFileName} -- package: 'Newtonsoft.Json',");
.And.HaveStdErrContaining($"Error: assembly specified in the dependencies manifest was not found probably due to missing runtime store associated with {targetManifestFileName} -- package: 'NuGet.Configuration',");
}
[Fact]