/// <summary> /// Create a new <see cref="GrpcAgentTest{TStartup, TAgent, TValue}"/> for a named <paramref name="userIdentifier"/> (converted using <see cref="TestSetUp.ConvertUsername(object?)"/>). /// </summary> /// <typeparam name="TAgent">The <b>Agent</b> <see cref="Type"/>.</typeparam> /// <typeparam name="TValue">The response value <see cref="Type"/>.</typeparam> /// <param name="userIdentifier">The user identifier (<c>null</c> indicates to use the <see cref="ExecutionContext.Current"/> <see cref="ExecutionContext.Username"/>).</param> /// <param name="args">Optional argument that can be referenced within the test.</param> /// <returns>An <see cref="GrpcAgentTest{TStartup, TAgent, TValue}"/> instance</returns> public GrpcAgentTest <TStartup, TAgent, TValue> TestGrpc <TAgent, TValue>(object userIdentifier, object?args = null) where TAgent : GrpcAgentBase { return(new GrpcAgentTest <TStartup, TAgent, TValue>(this, TestSetUp.ConvertUsername(userIdentifier), args)); }
/// <summary> /// Create a new <see cref="AgentTest{TStartup, TAgent}"/> for a named <paramref name="userIdentifier"/> (converted using <see cref="TestSetUp.ConvertUsername(object?)"/>). /// </summary> /// <typeparam name="TAgent">The <b>Agent</b> <see cref="Type"/>.</typeparam> /// <param name="userIdentifier">The user identifier (<c>null</c> indicates to use the <see cref="ExecutionContext.Current"/> <see cref="ExecutionContext.Username"/>).</param> /// <param name="args">Optional argument that can be referenced within the test.</param> /// <returns>An <see cref="AgentTest{TStartup, TAgent}"/> instance.</returns> public AgentTest <TStartup, TAgent> Test <TAgent>(object?userIdentifier, object?args = null) where TAgent : WebApiAgentBase { return(new AgentTest <TStartup, TAgent>(this, TestSetUp.ConvertUsername(userIdentifier), args)); }
/// <summary> /// Initializes a new instance of the <see cref="TestSetUpAttribute"/> class for a <paramref name="userIdentifier"/>. /// </summary> /// <param name="userIdentifier">The user identifier (<c>null</c> indicates to use the <see cref="TestSetUp.DefaultUsername"/>).</param> /// <param name="args">Optional argument that will be passed into the creation of the <see cref="ExecutionContext"/>.</param> /// <param name="needsSetUp">Indicates whether the registered set up is required to be invoked for the test.</param> public TestSetUpAttribute(object?userIdentifier, object?args = null, bool needsSetUp = true) : this(TestSetUp.ConvertUsername(userIdentifier), args, needsSetUp) { }
/// <summary> /// Create a new <see cref="GenericTester"/> for a named <paramref name="userIdentifier"/> (converted using <see cref="TestSetUp.ConvertUsername(object?)"/>). /// </summary> /// <param name="userIdentifier">The user identifier (<c>null</c> indicates to use the <see cref="ExecutionContext.Current"/> <see cref="ExecutionContext.Username"/>).</param> /// <param name="args">Optional argument that can be referenced within the test.</param> /// <param name="includeLoggingScopesInOutput">Indicates whether to include scopes in log output.</param> /// <returns>A <see cref="GenericTester"/> instance.</returns> public static GenericTester Test(object?userIdentifier, object?args = null, bool?includeLoggingScopesInOutput = null) => new GenericTester(TestSetUp.ConvertUsername(userIdentifier), args, includeLoggingScopesInOutput);
/// <summary> /// Create a new <see cref="ValidationTester"/> for a named <paramref name="userIdentifier"/> (converted using <see cref="TestSetUp.ConvertUsername(object?)"/>). /// </summary> /// <param name="userIdentifier">The user identifier (<c>null</c> indicates to use the <see cref="ExecutionContext.Current"/> <see cref="ExecutionContext.Username"/>).</param> /// <param name="args">Optional argument that can be referenced within the test.</param> /// <returns>A <see cref="ValidationTester"/> instance.</returns> public static ValidationTester Test(object?userIdentifier, object?args = null) => new ValidationTester(TestSetUp.ConvertUsername(userIdentifier), args);
/// <summary> /// Create a new <see cref="GenericTester"/> for a named <paramref name="userIdentifier"/> (converted using <see cref="TestSetUp.ConvertUsername(object?)"/>). /// </summary> /// <param name="userIdentifier">The user identifier (<c>null</c> indicates to use the <see cref="ExecutionContext.Current"/> <see cref="ExecutionContext.Username"/>).</param> /// <param name="args">Optional argument that can be referenced within the test.</param> /// <returns>A <see cref="GenericTester"/> instance.</returns> public static GenericTester Test(object?userIdentifier, object?args = null) => new GenericTester(TestSetUp.ConvertUsername(userIdentifier), args);