This PR ports the ActionOverloadingTests, AnnotationTests and AsyncRequestTests from using WCF services to use Microsoft.AspNetCore.OData
The ActionOverloading tests test action overloading. Action Overloading is where we have several actions with the same name but with different binding parameters.
The AnnotationTests tests the use of custom annotations and how users can add annotations to their model classes. Microsoft.AspNetCore.OData does not have a way for customers to add annotations to their model classes. There is on-going work to add support for this. These tests will be enabled once we have a way of adding these annotations when creating OData APIs.
The structure of these tests will be:
We'll have folders for the various scenarios that we are testing just like is in the current set-up. For example for the above tests: We have folders named:
ActionOverloadingTests
AnnotationsTests
AsyncRequestsTests
These folders will contain 3 sub-folders:
Server - This server folder will contain the controllers, EdmModels, DataSources and Data Model classes that will be used to create the OData APIs.
Client - This folder will contain proxy classes for the EdmModel that's used by all the services in that particular folder. Using OData Connected Service to generate the proxy classes. It is this generated class that will be used to create an instance of the DataServiceContext that will be used to communicate the various OData endpoints.
Tests - This folder will contain all tests classes that contain tests for the particular scenario that we're testing.
I've added a Common folder in Microsoft.OData.Client.E2E.Tests.csproj that will have a common DataModel and Data Source for some test scenarios that might share the various Model classes or Data Sources.
Checklist (Uncheck if it is not completed)
[ ] Test cases added
[ ] Build and test with one-click build and test script passed
Additional work necessary
If documentation update is needed, please add "Docs Needed" label to the issue and provide details about the required document change in the issue.
Issues
This pull request fixes #xxx.
Description
This PR ports the
ActionOverloadingTests
,AnnotationTests
andAsyncRequestTests
from using WCF services to useMicrosoft.AspNetCore.OData
The
ActionOverloading
tests test action overloading. Action Overloading is where we have several actions with the same name but with different binding parameters.The
AnnotationTests
tests the use of custom annotations and how users can add annotations to their model classes.Microsoft.AspNetCore.OData
does not have a way for customers to add annotations to their model classes. There is on-going work to add support for this. These tests will be enabled once we have a way of adding these annotations when creating OData APIs.The
AsyncRequestsTests
test the use of the Prefer headerRespond-Async
. More info on what thisprefer-header
is here: https://docs.oasis-open.org/odata/odata/v4.01/cs01/part1-protocol/odata-v4.01-cs01-part1-protocol.html#sec_AsynchronousRequests.The structure of these tests will be: We'll have folders for the various scenarios that we are testing just like is in the current set-up. For example for the above tests: We have folders named:
These folders will contain 3 sub-folders:
EdmModel
that's used by all the services in that particular folder. UsingOData Connected Service
to generate the proxy classes. It is this generated class that will be used to create an instance of theDataServiceContext
that will be used to communicate the various OData endpoints.I've added a
Common
folder inMicrosoft.OData.Client.E2E.Tests.csproj
that will have a common DataModel and Data Source for some test scenarios that might share the various Model classes or Data Sources.Checklist (Uncheck if it is not completed)
Additional work necessary
If documentation update is needed, please add "Docs Needed" label to the issue and provide details about the required document change in the issue.