Skip to content

Commit 48720b8

Browse files
committed
Check updated composition error messages in workload tests
1 parent c9d64aa commit 48720b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Tests/Microsoft.NET.Sdk.WorkloadManifestReader.Tests/ManifestTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ string MakeManifest(string version, params (string id, string version)[] depends
191191
};
192192

193193
var missingManifestEx = Assert.Throws<WorkloadManifestCompositionException>(() => WorkloadResolver.CreateForTests(missingManifestProvider, new[] { fakeRootPath }));
194-
Assert.Contains("missing dependency", missingManifestEx.Message);
194+
Assert.StartsWith("Did not find workload manifest dependency 'BBB' required by manifest 'AAA'", missingManifestEx.Message);
195195

196196
var inconsistentManifestProvider = new InMemoryFakeManifestProvider
197197
{
@@ -202,7 +202,7 @@ string MakeManifest(string version, params (string id, string version)[] depends
202202
};
203203

204204
var inconsistentManifestEx = Assert.Throws<WorkloadManifestCompositionException>(() => WorkloadResolver.CreateForTests(inconsistentManifestProvider, new[] { fakeRootPath }));
205-
Assert.Contains("Inconsistency in workload manifest", inconsistentManifestEx.Message);
205+
Assert.StartsWith("Workload manifest dependency 'DDD' version '39.0.0' is lower than version '30.0.0' required by manifest 'BBB'", inconsistentManifestEx.Message);
206206
}
207207

208208
[Fact]

0 commit comments

Comments
 (0)