Repository navigation
Expand file tree
/
Copy pathFunctionTester.cs
More file actions
29 lines (27 loc) · 1.84 KB
/
Copy pathFunctionTester.cs
File metadata and controls
29 lines (27 loc) · 1.84 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
// Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/UnitTestEx
using System;
using System.Collections.Generic;
using UnitTestEx.Abstractions;
using UnitTestEx.Azure.Functions;
namespace UnitTestEx
{
/// <summary>
/// Provides the Function testing capability.
/// </summary>
public static class FunctionTester
{
/// <summary>
/// Creates a new instance of the <see cref="FunctionTester{TEntryPoint}"/> class.
/// </summary>
/// <typeparam name="TEntryPoint">Any <see cref="Type"/> within the Azure Functions isolated-worker application assembly (e.g. a function class); the application's own entry point (<c>Program.cs</c>) is executed as-is to build the host.</typeparam>
/// <param name="includeUnitTestConfiguration">Indicates whether to include '<c>appsettings.unittest.json</c>' configuration file.</param>
/// <param name="includeUserSecrets">Indicates whether to include user secrets.</param>
/// <param name="additionalConfiguration">Additional configuration values to add/override.</param>
/// <param name="createFactory">The optional function to create the <see cref="TestFrameworkImplementor"/> instance.</param>
/// <param name="output">The optional framework output helper, callback, or writer.</param>
/// <returns>The <see cref="FunctionTester{TEntryPoint}"/>.</returns>
public static FunctionTester<TEntryPoint> Create<TEntryPoint>(bool? includeUnitTestConfiguration = null, bool? includeUserSecrets = null, IEnumerable<KeyValuePair<string, string?>>? additionalConfiguration = null, Func<TestFrameworkImplementor>? createFactory = null, object? output = null)
where TEntryPoint : class
=> new(includeUnitTestConfiguration, includeUserSecrets, additionalConfiguration, createFactory, output);
}
}