forked from Azure/azure-sdk-for-net
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the AzureServiceTokenProvider mockable (Azure#8464)
- Loading branch information
1 parent
24a8f2e
commit a8607ef
Showing
5 changed files
with
39 additions
and
9 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
sdk/mgmtcommon/AppAuthentication/Azure.Services.AppAuthentication.TestCommon/MockUtil.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for license information. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Reflection; | ||
using Xunit; | ||
|
||
namespace Microsoft.Azure.Services.AppAuthentication.TestCommon | ||
{ | ||
public class MockUtil | ||
{ | ||
public static void AssertPublicMethodsAreVirtual<T>() | ||
{ | ||
foreach (MethodInfo methodInfo in typeof(T).GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly)) | ||
{ | ||
Assert.True(methodInfo.IsVirtual, $"Method {methodInfo.Name} is not virtual"); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters