/// <summary> /// Configures expectation into the environment. /// </summary> /// <param name="config">The configuration.</param> /// <param name="ct"></param> /// <returns>The unique identifier for the expectation configuration.</returns> /// <exception cref="ConfigurationApplicationException"></exception> public async Task <IConfigurationHandle> ConfigureAsync(Action <IConfigurationContext> config, CancellationToken ct = default) { // Gather configuration var context = new ConfigurationContext(this); config(context); return(await context.ApplyAsync(ct)); }