public async Task ShouldCreateANewClient() { IThreadClientFactory factory = ThreadClientFactory.Create(); IThreadClient client = await factory.CreateClientAsync(); Assert.IsNotNull(client); }
/// <summary> /// Create a new client instance that implement <see cref="IThreadClient"/> interface. /// </summary> /// <returns>A instance of a client with implements <see cref="IThreadClient"/></returns> public Task <IThreadClient> CreateClientAsync() { IThreadClient threadClient = serviceProvider.GetRequiredService <IThreadClient>(); return(Task.FromResult(threadClient)); }