VOOZH about

URL: https://www.nuget.org/packages/AzureFunctions.TestFramework.Tables/

⇱ NuGet Gallery | AzureFunctions.TestFramework.Tables 0.14.0




AzureFunctions.TestFramework.Tables 0.14.0

dotnet add package AzureFunctions.TestFramework.Tables --version 0.14.0
 
 
NuGet\Install-Package AzureFunctions.TestFramework.Tables -Version 0.14.0
 
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AzureFunctions.TestFramework.Tables" Version="0.14.0" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AzureFunctions.TestFramework.Tables" Version="0.14.0" />
 
Directory.Packages.props
<PackageReference Include="AzureFunctions.TestFramework.Tables" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AzureFunctions.TestFramework.Tables --version 0.14.0
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: AzureFunctions.TestFramework.Tables, 0.14.0"
 
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AzureFunctions.TestFramework.Tables@0.14.0
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AzureFunctions.TestFramework.Tables&version=0.14.0
 
Install as a Cake Addin
#tool nuget:?package=AzureFunctions.TestFramework.Tables&version=0.14.0
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

AzureFunctions.TestFramework.Tables

👁 NuGet

Table input binding support for the Azure Functions Test Framework. Provides WithTableEntity(...) and WithTableEntities(...) — builder extensions that inject fake Azure Table Storage data for functions with [TableInput] parameters in integration tests. Output binding values ([TableOutput]) are captured generically by Core's FunctionInvocationResult without any per-extension work.

[TableInput] injection

// Function under test
[Function("LookupOrder")]
public static string Run(
 [QueueTrigger("lookup-queue")] string rowKey,
 [TableInput("Orders", "customer-1", "{queueTrigger}")] OrderEntity order)
{
 return $"Order: {order.Status}";
}
using AzureFunctions.TestFramework.Core;
using AzureFunctions.TestFramework.Tables;

// Single entity — matches [TableInput("Orders", "customer-1", "order-42")]
_testHost = await new FunctionsTestHostBuilder()
 .WithFunctionsAssembly(typeof(MyFunction).Assembly)
 .WithTableEntity("Orders", "customer-1", "order-42",
 new OrderEntity { PartitionKey = "customer-1", RowKey = "order-42", Status = "Pending" })
 .BuildAndStartAsync();

// Collection — matches [TableInput("Orders")] (no partitionKey / rowKey)
_testHost = await new FunctionsTestHostBuilder()
 .WithFunctionsAssembly(typeof(MyFunction).Assembly)
 .WithTableEntities("Orders",
 new[]
 {
 new OrderEntity { PartitionKey = "customer-1", RowKey = "order-1", Status = "Pending" },
 new OrderEntity { PartitionKey = "customer-1", RowKey = "order-2", Status = "Shipped" },
 })
 .BuildAndStartAsync();

// Partition-scoped collection — matches [TableInput("Orders", "customer-1")]
_testHost = await new FunctionsTestHostBuilder()
 .WithFunctionsAssembly(typeof(MyFunction).Assembly)
 .WithTableEntities("Orders", "customer-1",
 new[]
 {
 new OrderEntity { PartitionKey = "customer-1", RowKey = "order-1", Status = "Pending" },
 })
 .BuildAndStartAsync();

Lookup is performed from most-specific to least-specific key:

  1. tableName/partitionKey/rowKey — single entity (matches [TableInput("T", "pk", "rk")])
  2. tableName/partitionKey — partition-scoped collection (matches [TableInput("T", "pk")])
  3. tableName — full-table collection (matches [TableInput("T")])

Supported parameter types for [TableInput]: POCO types, TableEntity / ITableEntity, IEnumerable<T>. TableClient uses a different model-binding-data mechanism and is not supported by WithTableEntity / WithTableEntities. For TableClient parameters, override the Azure Tables SDK client in DI via ConfigureServices.

[TableOutput] capture

Output binding values are captured generically by Core's FunctionInvocationResult.OutputData without any extra configuration:

var result = await _testHost.InvokeQueueAsync("WriteOrder", message);
var entity = result.ReadOutputAs<OrderEntity>("Entity"); // binding name from [TableOutput]
Assert.Equal("customer-1", entity.PartitionKey);

References

License

MIT

Product Versions Compatible and additional computed target framework versions.
.NET net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 is compatible.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
0.14.0 96 5/25/2026
0.13.2 107 4/30/2026
0.12.0 111 4/20/2026
0.11.2 109 4/14/2026
0.11.1 112 4/13/2026
0.11.0 113 4/13/2026
0.10.0 113 4/11/2026