MyService.ExecuteAsync C# (CSharp) Method

ExecuteAsync() public method

public ExecuteAsync ( CancellationToken token ) : Task
token CancellationToken
return Task
    public async Task ExecuteAsync(CancellationToken token)
    {
        var step1=Step1(_headChannel.Reader,token);
        var step2=Step2(step1,token);        
        await step2.Completion;
    }
    public Task PostAsync(MyType0 input)

Usage Example

Beispiel #1
0
        public async Task Test1()
        {
            _httpClientFactory.Setup(factory => factory.GetHttpClient())
            .Returns(new MockHttpClient(new HttpResponseMessage(HttpStatusCode.OK)));

            var response = await _myService.ExecuteAsync();

            Assert.That(response.StatusCode == HttpStatusCode.OK);
        }