Azure.Deployments.Testing.Utilities
1.827.0
Prefix Reserved
dotnet add package Azure.Deployments.Testing.Utilities --version 1.827.0
NuGet\Install-Package Azure.Deployments.Testing.Utilities -Version 1.827.0
<PackageReference Include="Azure.Deployments.Testing.Utilities" Version="1.827.0" />
<PackageVersion Include="Azure.Deployments.Testing.Utilities" Version="1.827.0" />
<PackageReference Include="Azure.Deployments.Testing.Utilities" />
paket add Azure.Deployments.Testing.Utilities --version 1.827.0
#r "nuget: Azure.Deployments.Testing.Utilities, 1.827.0"
#:package Azure.Deployments.Testing.Utilities@1.827.0
#addin nuget:?package=Azure.Deployments.Testing.Utilities&version=1.827.0
#tool nuget:?package=Azure.Deployments.Testing.Utilities&version=1.827.0
About
This package contains utilities for unit testing relating to Azure Resource Manager deployments packages. It should not be used outside of a testing environment.
Baselines
Use EmbeddedFilesTestDataAttribute to discover embedded inputs and materialize their directory through the MSTest context:
[TestMethod]
[TestCategory(BaselineHelper.BaselineTestCategory)]
[EmbeddedFilesTestData(@"^Files/.*/main\.json$")]
public void Produces_expected_output(EmbeddedFile inputFile)
{
var files = TestContext.MaterializeBaselineFolder(inputFile);
GenerateOutput(files.GetFile(inputFile.FileName).OutputFilePath)
.Should().MatchJsonBaseline(files.GetFile("result.json"));
}
MatchTextBaseline and MatchJsonBaseline save the actual value as a test result, compare it with the checked-in baseline, and support the existing SetBaseLine update workflow. Existing BaselineFolder, ITestFile, and imperative assertion APIs remain available for compatibility.
Use BaselineFolder.GetFileForPath to look up the baseline for a file that the code under test wrote inside OutputFolderPath. MaterializeBaselineFolder returns a MaterializedBaselineFolder, whose EntryFile is the baseline file for the input the folder was materialized from.
Test output is written under TestContext.GetOutputRootPath() (ResultsDirectory/TestOutput), so per-test folders are not mixed with build outputs when ResultsDirectory is the build output directory.
Source paths
Baseline source paths are resolved from the project directory, which the package targets record in each test assembly. The targets also flow transitively, so projects that consume the package through a shared test project reference get the same behavior.
Update instructions
Baseline failures include instructions for updating baselines. To replace the default command and documentation link, set these MSBuild properties in the projects that embed baselines (for example, in Directory.Build.props):
<PropertyGroup>
<TestBaselineUpdateCommand>dotnet test -- --filter "TestCategory=Baseline" --test-parameter SetBaseLine=true</TestBaselineUpdateCommand>
<TestBaselineDocumentationUrl>https://example.com/docs/baselines</TestBaselineDocumentationUrl>
</PropertyGroup>
Disclaimer
The Azure Deployments team has made this NuGet package publicly available on nuget.org. While it is public, it is not a supported package. Any dependency you take on this package will be done at your own risk and we reserve the right to push breaking changes to this package at any time.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- DiffPlex (>= 1.7.2)
- FluentAssertions (>= 6.8.0)
- JsonDiffPatch.Net (>= 2.3.0)
- MSTest.TestFramework (>= 4.0.1)
- Newtonsoft.Json (>= 13.0.3)
- System.Collections.Immutable (>= 10.0.10)
- System.Memory (>= 4.6.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Azure.Deployments.Testing.Utilities:
| Repository | Stars |
|---|---|
|
Azure/azure-resource-manager-schemas
Schemas used to author and validate Resource Manager Templates. These schemas power the intellisense and syntax completion in our ARM Tools VSCode extension, as well as the Export Template API
|