Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cancellation token support #23

Merged
merged 5 commits into from
Jul 14, 2020
Merged

Add cancellation token support #23

merged 5 commits into from
Jul 14, 2020

Conversation

JoeyMckenzie
Copy link
Contributor

Addresses issue #20, with accompanying updates to the sample project and additional unit tests.

@@ -44,5 +46,25 @@ public async Task CreatesANewAuthor()
Assert.Equal(result.PluralsightUrl, newAuthor.PluralsightUrl);
Assert.Equal(result.TwitterAlias, newAuthor.TwitterAlias);
}

[Fact]
public async Task GivenLongRunningCreateRequest_WhenTokenSourceCallsForCancellation_RequestIsTermainated()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public async Task GivenLongRunningCreateRequest_WhenTokenSourceCallsForCancellation_RequestIsTermainated()
public async Task GivenLongRunningCreateRequest_WhenTokenSourceCallsForCancellation_RequestIsTerminated()

@@ -34,5 +36,19 @@ public async Task ReturnsAuthorById()
Assert.Equal(firstAuthor.PluralsightUrl, result.PluralsightUrl);
Assert.Equal(firstAuthor.TwitterAlias, result.TwitterAlias);
}

[Fact]
public async Task GivenLongRunningGetRequest_WhenTokenSourceCallsForCancellation_RequestIsTermainated()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public async Task GivenLongRunningGetRequest_WhenTokenSourceCallsForCancellation_RequestIsTermainated()
public async Task GivenLongRunningGetRequest_WhenTokenSourceCallsForCancellation_RequestIsTerminated()

@@ -30,5 +32,18 @@ public async Task ReturnsTwoGivenTwoAuthors()
Assert.NotNull(result);
Assert.Equal(SeedData.Authors().Count(), result.Count());
}

[Fact]
public async Task GivenLongRunningListRequest_WhenTokenSourceCallsForCancellation_RequestIsTermainated()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public async Task GivenLongRunningListRequest_WhenTokenSourceCallsForCancellation_RequestIsTermainated()
public async Task GivenLongRunningListRequest_WhenTokenSourceCallsForCancellation_RequestIsTerminated()

}

[Fact]
public async Task GivenLongRunningPaginatedListRequest_WhenTokenSourceCallsForCancellation_RequestIsTermainated()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public async Task GivenLongRunningPaginatedListRequest_WhenTokenSourceCallsForCancellation_RequestIsTermainated()
public async Task GivenLongRunningPaginatedListRequest_WhenTokenSourceCallsForCancellation_RequestIsTerminated()

@@ -44,5 +46,24 @@ public async Task UpdateAnExistingAuthor()
Assert.Equal(result.PluralsightUrl, authorPreUpdate.PluralsightUrl);
Assert.Equal(result.TwitterAlias, authorPreUpdate.TwitterAlias);
}

[Fact]
public async Task GivenLongRunningUpdateRequest_WhenTokenSourceCallsForCancellation_RequestIsTermainated()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public async Task GivenLongRunningUpdateRequest_WhenTokenSourceCallsForCancellation_RequestIsTermainated()
public async Task GivenLongRunningUpdateRequest_WhenTokenSourceCallsForCancellation_RequestIsTerminated()

Copy link
Owner

@ardalis ardalis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix typos then looks good.

@JoeyMckenzie
Copy link
Contributor Author

Good catch, updated with latest commit.

@ardalis ardalis merged commit 0bd2823 into ardalis:master Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants