Skip to content

Commit 1315b3c

Browse files
authored
Improve a test assert message (#5104)
1 parent 7d17705 commit 1315b3c

File tree

1 file changed

+4
-1
lines changed
  • tests/Microsoft.Identity.Test.Integration.netcore/Infrastructure

1 file changed

+4
-1
lines changed

tests/Microsoft.Identity.Test.Integration.netcore/Infrastructure/MsalAssert.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ public static void AssertAuthResult(AuthenticationResult result, TokenSource tok
5252
Assert.IsNotNull(result.IdToken);
5353
Assert.IsNotNull(result.Account);
5454
Assert.IsNotNull(result.Account.Username);
55-
Assert.IsTrue(scopes.All(result.Scopes.Contains));
55+
Assert.IsTrue(
56+
scopes.All(result.Scopes.Contains),
57+
$"Scope mismatch. Expecting: {string.Join(", ", scopes)} " +
58+
$"Actual: {string.Join(", ", result.Scopes)}");
5659

5760
if (isPop)
5861
{

0 commit comments

Comments
 (0)