in src/Google.Cloud.Functions.Testing/FunctionTestServer.cs [101:125]
public List<TestLogEntry> GetLogEntries(Type type) =>
GetLogEntries(LoggerTypeNameHelper.GetCategoryNameForType(Preconditions.CheckNotNull(type, nameof(type))));
/// <summary>
/// Returns a list of log entries for the given category name. If no logs have been
/// written for the given category, an empty list is returned.
/// </summary>
/// <param name="categoryName">The category name for which to get log entries.</param>
/// <returns>A list of log entries for the given category name.</returns>
public List<TestLogEntry> GetLogEntries(string categoryName) =>
_testLoggerProvider.GetLogEntries(Preconditions.CheckNotNull(categoryName, nameof(categoryName)));
/// <summary>
/// Disposes of the host of the test server.
/// </summary>
public void Dispose() => Host.Dispose();
}
/// <summary>
/// Generic version of <see cref="FunctionTestServer"/>, making it particularly simple to specify as
/// a test fixture.
/// </summary>
/// <typeparam name="TFunction">The function type to host in the server</typeparam>
public class FunctionTestServer<TFunction> : FunctionTestServer
{