Microsoft.Azure.ApiManagement.PolicyToolkit.Testing
1.1.0
Prefix Reserved
dotnet add package Microsoft.Azure.ApiManagement.PolicyToolkit.Testing --version 1.1.0
NuGet\Install-Package Microsoft.Azure.ApiManagement.PolicyToolkit.Testing -Version 1.1.0
<PackageReference Include="Microsoft.Azure.ApiManagement.PolicyToolkit.Testing" Version="1.1.0" />
<PackageVersion Include="Microsoft.Azure.ApiManagement.PolicyToolkit.Testing" Version="1.1.0" />
<PackageReference Include="Microsoft.Azure.ApiManagement.PolicyToolkit.Testing" />
paket add Microsoft.Azure.ApiManagement.PolicyToolkit.Testing --version 1.1.0
#r "nuget: Microsoft.Azure.ApiManagement.PolicyToolkit.Testing, 1.1.0"
#:package Microsoft.Azure.ApiManagement.PolicyToolkit.Testing@1.1.0
#addin nuget:?package=Microsoft.Azure.ApiManagement.PolicyToolkit.Testing&version=1.1.0
#tool nuget:?package=Microsoft.Azure.ApiManagement.PolicyToolkit.Testing&version=1.1.0
Microsoft Azure ApiManagement Policy Toolkit Testing library
Microsoft Azure API Management is a hybrid, multicloud management platform for APIs across all environments. As a platform-as-a-service, API Management supports the complete API lifecycle.
This library contains classes, implementation of authoring library interfaces and mocks which allow testing policy expression and policy documents wrote in C# for Microsoft Azure Api Management.
Getting started
Install the package
Install the Microsoft Azure Api Management Policy Toolkit test library with NuGet:
dotnet add package Microsoft.Azure.ApiManagement.PolicyToolkit.Testing
Write test
using Contoso.Apis.Policies;
using Microsoft.Azure.ApiManagement.PolicyToolkit.Testing.Expressions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Contoso.Apis.Policies.Tests;
[TestClass]
public class ApiOperationPolicyTest
{
[TestMethod]
public void TestHelloFromExpression()
{
var context = new MockExpressionContext();
Assert.AreEqual("World", ApiOperationPolicy.HelloFromExpression(context));
}
}
Documentation
Documentation is available to help you learn how to use this package:
Examples
Code samples for using the toolkit can be found in the following locations
Troubleshooting
- File an issue via GitHub Issues.
- For questions, suggestions, or discussions, please use GitHub Discussions
Contributing
For details on contributing to this repository, see the contributing guide.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (for example, label, comment). Follow the instructions provided by the bot. You'll only need to do this action once across all repositories using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any other questions or comments.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Microsoft.Azure.ApiManagement.PolicyToolkit.Authoring (>= 1.1.0)
- Microsoft.IdentityModel.JsonWebTokens (>= 8.17.0)
- Newtonsoft.Json (>= 13.0.4)
- System.IdentityModel.Tokens.Jwt (>= 8.17.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.1.0 | 179 | 8/24/2026 |
| 1.1.0-rc.1 | 74 | 8/24/2026 |