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

Abstract common functionality in assertion objects to eliminate duplication #66

Open
mariacamenzuli opened this issue Jan 2, 2017 · 0 comments

Comments

@mariacamenzuli
Copy link
Member

Assertion objects have some common capabilities. For example, both the JsonSchemaAssertions and the JsonResponseAssertions allow the user to set an expected content type. The code that handles this kind of common functionality is currently duplicated in these requests. There may be other cases of this. At the end of the day, these objects are all making assertions on HTTP responses, so they are bound to have some common functionality.

We need to refactor the assertions to abstract this common functionality.

Suggestion from @KPull: We can abstract this into a CommonAssertions object (just like we have CommonRequestAttributes), and have the applicable assertions inherit from CommonAssertions by composition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants