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

Example of how to unit test a controller method which supports odata #151

Closed

Conversation

andrei-galkin
Copy link

Hello guys,

This is the test project example how controllers can be tested with odata protocol support.

@ghost
Copy link

ghost commented Apr 20, 2021

CLA assistant check
All CLA requirements met.

sample/ODataRoutingSample.Tests/AccountsControllerTests.cs Outdated Show resolved Hide resolved
/// <summary>
/// This is a suggestion how to unit test a controller which will be very useful for the devs
/// </summary>
[TestClass]
Copy link
Member

Choose a reason for hiding this comment

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

I'd like to use xunit

Copy link
Author

Choose a reason for hiding this comment

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

I will update it.

@xuzhg
Copy link
Member

xuzhg commented Apr 22, 2021

@andrei-galkin why don't add similar test cases (xunit) into my e2e test project?

@andrei-galkin
Copy link
Author

@xuzhg I will follow your suggestion.

@andrei-galkin andrei-galkin force-pushed the ODataRoutingSample.Tests branch from 657eeae to a679422 Compare June 27, 2021 01:37
@andrei-galkin
Copy link
Author

Hello @xuzhg,
I corrected what was suggested.
I check once again this suggestion - "why don't add similar test cases (xunit) into my e2e test project?"
My idea to give the real example example on the real project how to unit test a controller's method which supports ODATA. Personally, I spent day to figure it out and I would be glad to help developer who are doing the same.

Thank you for the review
Andrei

@xuzhg xuzhg deleted the branch OData:master January 6, 2022 23:33
@xuzhg xuzhg closed this Jan 6, 2022
@xuzhg
Copy link
Member

xuzhg commented Jan 7, 2022

@andrei-galkin We switched the default branch from master to main and this PR is accidentally closed.
If you still want me to accept it, please:

  1. Create a new PR using main branch

Thanks.

@andrei-galkin
Copy link
Author

Thank you @xuzhg. Created #438.

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.

3 participants