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 acceptance tests #51

Merged
merged 1 commit into from
Feb 10, 2015
Merged

Conversation

csantero
Copy link
Collaborator

@csantero csantero commented Feb 8, 2015

I've extracted the acceptance tests from #50 and put them in JSONAPI.EntityFramework.Tests. These tests boot up a sample project JSONAPI.EntityFramework.Tests.TestWebApp. This sample API is more fleshed out than the Todos, with 4 different blog-related model classes. This should let us model more interesting scenarios in the future.

I did have to make one change to JsonApiFormatter in order to make my POST test work. To-many resources were being serialized as null if the underlying result's property value was null. The spec indicates that those should be empty arrays.

Of course, all these tests will have to be changed once json-api/json-api#341 lands, but at least now we have a baseline.

@SphtKr
Copy link
Collaborator

SphtKr commented Feb 9, 2015

This is definitely good. Yes, we were going to need a more complex object model than TodoMVC provides to do compliance testing anyway.

WRT json-api/json-api#341 : Ai yi yi...too much to keep track of. After having to dive into the OWIN stuff I got a little bent out of shape about emberjs/ember.js#10062 and now this I hadn't seen. I guess that's what we get for regularly working with v0.x stuff. Hey, at least id is a required key again! Happy about that. And these:

  • Support for creating, updating, and deleting multiple resources in a single request has been moved to the Bulk extension.
  • JSON Patch support has been moved to the Patch extension.

...will make it MUCH easier for us to have full spec coverage. I already have a nasty hack in JsonApiFormatter to support that first bullet that we may be able to remove. Also I notice that the meta key in a resource object is now reserved (again), which will probably be very useful.

I'll probably need to open an issue just to track/plan this.

@csantero
Copy link
Collaborator Author

Conflicts resolved. I can't wait until .kproj replaces .csproj. .ksproj no longer tracks every file and just assumes that everything in the folder is part of the project, thereby avoiding these merge conflicts that happen every time two people add separate files.

SphtKr added a commit that referenced this pull request Feb 10, 2015
@SphtKr SphtKr merged commit e78e0f7 into JSONAPIdotNET:master Feb 10, 2015
@csantero csantero deleted the acceptance-tests branch February 11, 2015 15:37
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