Skip to main content
Glama

Azure MCP Server

Official
TestExtensions.cs1.48 kB
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using System.Text.Json; using Xunit; namespace AzureMcp.Tests; public static class TestExtensions { public const string RunningFromDotnetTestReason = "Test skipped when running from dotnet test. This test requires interactive environment."; public static bool IsRunningFromDotnetTest() { bool isVsCode = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("VSCODE_CLI")) || !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("VSCODE_PID")) || !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("VSCODE_CWD")); if (isVsCode) { return false; } // Check for environment variables that indicate we're running from dotnet test return !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("VSTEST_HOST_DEBUG")) || !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DOTNET_HOST_PATH")); } public static JsonElement AssertProperty(this JsonElement? element, string propertyName) { Assert.NotNull(element); return element.Value.AssertProperty(propertyName); } public static JsonElement AssertProperty(this JsonElement element, string propertyName) { Assert.True(element.TryGetProperty(propertyName, out var property), $"Property '{propertyName}' not found."); return property; } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Azure/azure-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server