-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Switch from XUnit to MSTest + FluentAssertions. - Have tests inherit from RestierTestBase so the TestContext is always available. - Start standardizing the testing EF models to eventually elminate the TestApiA|TestApiB BS. - Integration tests should always write the HttpResponse content to the test output for later inspection. - Implement Breakdance.Restier for all existing integration tests. - Implement Breakdance Metadata and Visibility Reports for the shared testable contexts. - Lay the groundwork for more integration tests. - Man this project needs more unit tests. [x] All unit tests pass.
- Loading branch information
1 parent
1d80571
commit 45f858d
Showing
53 changed files
with
1,400 additions
and
1,563 deletions.
There are no files selected for viewing
25 changes: 0 additions & 25 deletions
25
Microsoft.Restier.Tests.Shared/Scenarios/Library/LibraryApi.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
src/Microsoft.Restier.Tests.AspNet/Baselines/LibraryApi-ApiMetadata.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"> | ||
<edmx:DataServices> | ||
<Schema Namespace="Microsoft.Restier.Tests.Shared.Scenarios.Library" xmlns="http://docs.oasis-open.org/odata/ns/edm"> | ||
<EntityType Name="Book"> | ||
<Key> | ||
<PropertyRef Name="Id" /> | ||
</Key> | ||
<Property Name="Id" Type="Edm.Guid" Nullable="false" /> | ||
<Property Name="Title" Type="Edm.String" /> | ||
<NavigationProperty Name="Publisher" Type="Microsoft.Restier.Tests.Shared.Scenarios.Library.Publisher" /> | ||
</EntityType> | ||
<EntityType Name="Publisher"> | ||
<Key> | ||
<PropertyRef Name="Id" /> | ||
</Key> | ||
<Property Name="Id" Type="Edm.String" Nullable="false" /> | ||
<Property Name="Addr" Type="Microsoft.Restier.Tests.Shared.Scenarios.Library.Address" /> | ||
<NavigationProperty Name="Books" Type="Collection(Microsoft.Restier.Tests.Shared.Scenarios.Library.Book)" /> | ||
</EntityType> | ||
<EntityType Name="Employee"> | ||
<Key> | ||
<PropertyRef Name="Id" /> | ||
</Key> | ||
<Property Name="Id" Type="Edm.Guid" Nullable="false" /> | ||
<Property Name="FullName" Type="Edm.String" /> | ||
<Property Name="Addr" Type="Microsoft.Restier.Tests.Shared.Scenarios.Library.Address" /> | ||
<Property Name="Universe" Type="Microsoft.Restier.Tests.Shared.Scenarios.Library.Universe" /> | ||
</EntityType> | ||
<ComplexType Name="Address"> | ||
<Property Name="Street" Type="Edm.String" /> | ||
<Property Name="Zip" Type="Edm.String" /> | ||
</ComplexType> | ||
<ComplexType Name="Universe"> | ||
<Property Name="BinaryProperty" Type="Edm.Binary" /> | ||
<Property Name="BooleanProperty" Type="Edm.Boolean" Nullable="false" /> | ||
<Property Name="ByteProperty" Type="Edm.Byte" Nullable="false" /> | ||
<Property Name="DateProperty" Type="Edm.Date" Nullable="false" /> | ||
<Property Name="DateTimeOffsetProperty" Type="Edm.DateTimeOffset" Nullable="false" /> | ||
<Property Name="DecimalProperty" Type="Edm.Decimal" Nullable="false" /> | ||
<Property Name="DoubleProperty" Type="Edm.Double" Nullable="false" /> | ||
<Property Name="DurationProperty" Type="Edm.Duration" Nullable="false" /> | ||
<Property Name="GuidProperty" Type="Edm.Guid" Nullable="false" /> | ||
<Property Name="Int16Property" Type="Edm.Int16" Nullable="false" /> | ||
<Property Name="Int32Property" Type="Edm.Int32" Nullable="false" /> | ||
<Property Name="Int64Property" Type="Edm.Int64" Nullable="false" /> | ||
<Property Name="SingleProperty" Type="Edm.Single" Nullable="false" /> | ||
<Property Name="StringProperty" Type="Edm.String" /> | ||
<Property Name="TimeOfDayProperty" Type="Edm.TimeOfDay" Nullable="false" /> | ||
</ComplexType> | ||
<Function Name="PublishBook"> | ||
<Parameter Name="IsActive" Type="Edm.Boolean" Nullable="false" /> | ||
<ReturnType Type="Microsoft.Restier.Tests.Shared.Scenarios.Library.Book" /> | ||
</Function> | ||
<EntityContainer Name="Container"> | ||
<EntitySet Name="Books" EntityType="Microsoft.Restier.Tests.Shared.Scenarios.Library.Book"> | ||
<NavigationPropertyBinding Path="Publisher" Target="Publishers" /> | ||
</EntitySet> | ||
<EntitySet Name="Publishers" EntityType="Microsoft.Restier.Tests.Shared.Scenarios.Library.Publisher"> | ||
<NavigationPropertyBinding Path="Books" Target="Books" /> | ||
</EntitySet> | ||
<EntitySet Name="Readers" EntityType="Microsoft.Restier.Tests.Shared.Scenarios.Library.Employee" /> | ||
<FunctionImport Name="PublishBook" Function="Microsoft.Restier.Tests.Shared.Scenarios.Library.PublishBook" EntitySet="Books" /> | ||
</EntityContainer> | ||
</Schema> | ||
</edmx:DataServices> | ||
</edmx:Edmx> |
37 changes: 37 additions & 0 deletions
37
src/Microsoft.Restier.Tests.AspNet/Baselines/LibraryApi-ApiSurface.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
------------------------------------------------------------ | ||
Function Name | Found? | ||
------------------------------------------------------------ | ||
CanInsertBook | False | ||
CanUpdateBook | False | ||
CanDeleteBook | False | ||
OnInsertingBook | False | ||
OnUpdatingBook | False | ||
OnDeletingBook | False | ||
OnFilterBooks | False | ||
OnInsertedBook | False | ||
OnUpdatedBook | False | ||
OnDeletedBook | False | ||
CanInsertPublisher | False | ||
CanUpdatePublisher | False | ||
CanDeletePublisher | False | ||
OnInsertingPublisher | False | ||
OnUpdatingPublisher | False | ||
OnDeletingPublisher | False | ||
OnFilterPublishers | False | ||
OnInsertedPublisher | False | ||
OnUpdatedPublisher | False | ||
OnDeletedPublisher | False | ||
CanInsertEmployee | False | ||
CanUpdateEmployee | False | ||
CanDeleteEmployee | False | ||
OnInsertingEmployee | False | ||
OnUpdatingEmployee | False | ||
OnDeletingEmployee | False | ||
OnFilterReaders | False | ||
OnInsertedEmployee | False | ||
OnUpdatedEmployee | False | ||
OnDeletedEmployee | False | ||
CanExecutePublishBook | False | ||
OnExecutingPublishBook | False | ||
OnExecutedPublishBook | False | ||
------------------------------------------------------------ |
44 changes: 44 additions & 0 deletions
44
src/Microsoft.Restier.Tests.AspNet/Baselines/StoreApi-ApiMetadata.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"> | ||
<edmx:DataServices> | ||
<Schema Namespace="Microsoft.Restier.Tests.AspNet" xmlns="http://docs.oasis-open.org/odata/ns/edm"> | ||
<EntityType Name="Product"> | ||
<Key> | ||
<PropertyRef Name="Id" /> | ||
</Key> | ||
<Property Name="Id" Type="Edm.Int32" Nullable="false" /> | ||
<Property Name="Name" Type="Edm.String" /> | ||
<Property Name="Addr" Type="Microsoft.Restier.Tests.AspNet.Address" Nullable="false" /> | ||
<Property Name="Addr2" Type="Microsoft.Restier.Tests.AspNet.Address" /> | ||
<Property Name="Addr3" Type="Microsoft.Restier.Tests.AspNet.Address" /> | ||
</EntityType> | ||
<EntityType Name="Customer"> | ||
<Key> | ||
<PropertyRef Name="Id" /> | ||
</Key> | ||
<Property Name="Id" Type="Edm.Int16" Nullable="false" /> | ||
</EntityType> | ||
<EntityType Name="Store"> | ||
<Key> | ||
<PropertyRef Name="Id" /> | ||
</Key> | ||
<Property Name="Id" Type="Edm.Int64" Nullable="false" /> | ||
</EntityType> | ||
<ComplexType Name="Address"> | ||
<Property Name="Zip" Type="Edm.Int32" Nullable="false" /> | ||
</ComplexType> | ||
<Function Name="GetBestProduct"> | ||
<ReturnType Type="Microsoft.Restier.Tests.AspNet.Product" /> | ||
</Function> | ||
<Action Name="RemoveWorstProduct"> | ||
<ReturnType Type="Microsoft.Restier.Tests.AspNet.Product" /> | ||
</Action> | ||
<EntityContainer Name="Container"> | ||
<EntitySet Name="Products" EntityType="Microsoft.Restier.Tests.AspNet.Product" /> | ||
<EntitySet Name="Customers" EntityType="Microsoft.Restier.Tests.AspNet.Customer" /> | ||
<EntitySet Name="Stores" EntityType="Microsoft.Restier.Tests.AspNet.Store" /> | ||
<FunctionImport Name="GetBestProduct" Function="Microsoft.Restier.Tests.AspNet.GetBestProduct" EntitySet="Products" IncludeInServiceDocument="true" /> | ||
<ActionImport Name="RemoveWorstProduct" Action="Microsoft.Restier.Tests.AspNet.RemoveWorstProduct" EntitySet="Products" /> | ||
</EntityContainer> | ||
</Schema> | ||
</edmx:DataServices> | ||
</edmx:Edmx> |
40 changes: 40 additions & 0 deletions
40
src/Microsoft.Restier.Tests.AspNet/Baselines/StoreApi-ApiSurface.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
------------------------------------------------------------ | ||
Function Name | Found? | ||
------------------------------------------------------------ | ||
CanInsertCustomer | False | ||
CanUpdateCustomer | False | ||
CanDeleteCustomer | False | ||
OnInsertingCustomer | False | ||
OnUpdatingCustomer | False | ||
OnDeletingCustomer | False | ||
OnFilterCustomers | False | ||
OnInsertedCustomer | False | ||
OnUpdatedCustomer | False | ||
OnDeletedCustomer | False | ||
CanInsertProduct | False | ||
CanUpdateProduct | False | ||
CanDeleteProduct | False | ||
OnInsertingProduct | False | ||
OnUpdatingProduct | False | ||
OnDeletingProduct | False | ||
OnFilterProducts | False | ||
OnInsertedProduct | False | ||
OnUpdatedProduct | False | ||
OnDeletedProduct | False | ||
CanInsertStore | False | ||
CanUpdateStore | False | ||
CanDeleteStore | False | ||
OnInsertingStore | False | ||
OnUpdatingStore | False | ||
OnDeletingStore | False | ||
OnFilterStores | False | ||
OnInsertedStore | False | ||
OnUpdatedStore | False | ||
OnDeletedStore | False | ||
CanExecuteGetBestProduct | False | ||
OnExecutingGetBestProduct | False | ||
OnExecutedGetBestProduct | False | ||
CanExecuteRemoveWorstProduct | False | ||
OnExecutingRemoveWorstProduct | False | ||
OnExecutedRemoveWorstProduct | False | ||
------------------------------------------------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.