Skip to content

Commit ab6b96f

Browse files
authored
Use tfm specific dependencies in UWP restore tests (#6376)
1 parent 27c73ea commit ab6b96f

File tree

3 files changed

+28
-36
lines changed

3 files changed

+28
-36
lines changed

test/NuGet.Core.FuncTests/NuGet.Commands.FuncTest/UWPRestoreTests.cs

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,12 @@ public async Task UWPRestore_VerifySatellitePackagesAreCompatibleInPCL()
8181
using (var projectDir = TestDirectory.Create())
8282
{
8383
var configJson = JObject.Parse(@"{
84-
""dependencies"": {
85-
""Microsoft.AspNet.Mvc.de"": ""5.2.3""
86-
},
8784
""frameworks"": {
8885
""net46"": {
86+
""dependencies"": {
87+
""Microsoft.AspNet.Mvc.de"": ""5.2.3""
88+
} }
8989
}
90-
}
9190
}");
9291

9392
var specPath = Path.Combine(projectDir, "TestProject", "project.json");
@@ -121,14 +120,15 @@ public async Task UWPRestore_BlankUWPAppWithExcludes()
121120

122121
using var pathContext = new SimpleTestPathContext();
123122
var configJson = JObject.Parse(@"{
124-
""dependencies"": {
125-
""Microsoft.NETCore.UniversalWindowsPlatform"": {
126-
""version"": ""5.0.0"",
127-
""exclude"": ""build,runtime,compile,native""
128-
}
129-
},
130123
""frameworks"": {
131-
""uap10.0"": {}
124+
""uap10.0"": {
125+
""dependencies"": {
126+
""Microsoft.NETCore.UniversalWindowsPlatform"": {
127+
""version"": ""5.0.0"",
128+
""exclude"": ""build,runtime,compile,native""
129+
}
130+
}
131+
}
132132
},
133133
""runtimes"": {
134134
""win10-arm"": {},
@@ -249,11 +249,12 @@ public async Task UWPRestore_BlankUWPApp()
249249
using var pathContext = new SimpleTestPathContext();
250250

251251
var configJson = JObject.Parse(@"{
252-
""dependencies"": {
253-
""Microsoft.NETCore.UniversalWindowsPlatform"": ""5.0.0""
254-
},
255252
""frameworks"": {
256-
""uap10.0"": {}
253+
""uap10.0"": {
254+
""dependencies"": {
255+
""Microsoft.NETCore.UniversalWindowsPlatform"": ""5.0.0""
256+
}
257+
}
257258
},
258259
""runtimes"": {
259260
""win10-arm"": {},
@@ -304,11 +305,12 @@ public async Task UWPRestore_BlankUWPAppV1()
304305
using var pathContext = new SimpleTestPathContext();
305306

306307
var configJson = JObject.Parse(@"{
307-
""dependencies"": {
308-
""Microsoft.NETCore.UniversalWindowsPlatform"": ""5.0.0""
309-
},
310308
""frameworks"": {
311-
""uap10.0"": {}
309+
""uap10.0"": {
310+
""dependencies"": {
311+
""Microsoft.NETCore.UniversalWindowsPlatform"": ""5.0.0""
312+
}
313+
}
312314
},
313315
""runtimes"": {
314316
""win10-arm"": {},

test/NuGet.Core.FuncTests/NuGet.Commands.FuncTest/compiler/resources/uwpBlankAppV2.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16903,12 +16903,12 @@
1690316903
]
1690416904
},
1690516905
"project": {
16906-
"dependencies": {
16907-
"Microsoft.NETCore.UniversalWindowsPlatform": "[5.0.0, )"
16908-
},
1690916906
"frameworks": {
1691016907
"uap10.0": {
16911-
"targetAlias": "uap10.0"
16908+
"targetAlias": "uap10.0",
16909+
"dependencies": {
16910+
"Microsoft.NETCore.UniversalWindowsPlatform": "[5.0.0, )"
16911+
}
1691216912
}
1691316913
},
1691416914
"runtimes": {

test/NuGet.Core.Tests/NuGet.Commands.Test/ProjectResolutionTests.cs

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -508,28 +508,18 @@ public async Task ProjectResolution_MSBuildProjectDoesNotResolveByDirectory()
508508
var project1Json = @"
509509
{
510510
""version"": ""1.0.0-*"",
511-
""description"": """",
512-
""authors"": [ ""author"" ],
513-
""tags"": [ """" ],
514-
""projectUrl"": """",
515-
""licenseUrl"": """",
516-
""dependencies"": {
517-
""project2"": ""1.0.0-*""
518-
},
519511
""frameworks"": {
520512
""net45"": {
513+
""dependencies"": {
514+
""project2"": ""1.0.0-*""
515+
}
521516
}
522517
}
523518
}";
524519

525520
var project2Json = @"
526521
{
527522
""version"": ""1.0.0-*"",
528-
""description"": """",
529-
""authors"": [ ""author"" ],
530-
""tags"": [ """" ],
531-
""projectUrl"": """",
532-
""licenseUrl"": """",
533523
""frameworks"": {
534524
""net45"": {
535525
}

0 commit comments

Comments
 (0)