-
Notifications
You must be signed in to change notification settings - Fork 540
Expand file tree
/
Copy pathContractEnforcementTests.cs
More file actions
32 lines (31 loc) · 1.32 KB
/
ContractEnforcementTests.cs
File metadata and controls
32 lines (31 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
namespace Microsoft.Azure.Cosmos.AI.Tests
{
using Microsoft.VisualStudio.TestTools.UnitTesting;
[TestCategory("Windows")]
[TestCategory("UpdateContract")]
[TestClass]
public class ContractEnforcementTests
{
/// <summary>
/// Locks the public API surface of <c>Microsoft.Azure.Cosmos.AI</c> against a
/// versioned baseline so accidental renames, visibility changes, or removals
/// surface at PR review time instead of shipping to a preview NuGet.
///
/// IMPORTANT: Because tests can run on multiple .NET versions, the contract
/// validation uses framework-specific baselines to ensure consistency:
///
/// - When running on net8.0: validates against DotNetSDKCosmosAIAPI.net8.json
///
/// To update baselines, run: UpdateContracts.ps1 from the repository root.
/// </summary>
[TestMethod]
public void ContractChanges()
{
Cosmos.Tests.Contracts.ContractEnforcement.ValidateContract(
dllName: "Microsoft.Azure.Cosmos.AI",
contractType: Cosmos.Tests.Contracts.ContractType.Standard,
baselinePattern: "DotNetSDKCosmosAIAPI",
breakingChangesPattern: "DotNetSDKCosmosAIAPIChanges");
}
}
}