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

Enhanced MockRestResponseCreators by a withStatus with body and media type #1608

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
4 participants
@hadjiski

hadjiski commented Nov 29, 2017

Otherwise one have to do something like this:

    private static class SomeResponseCreator extends DefaultResponseCreator {

        SomeResponseCreator(HttpStatus statusCode) {
            super(statusCode);
        }
    }
Radi Hadjiski
@pivotal-issuemaster

This comment has been minimized.

Show comment
Hide comment
@pivotal-issuemaster

pivotal-issuemaster Nov 29, 2017

@hadjiski Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

pivotal-issuemaster commented Nov 29, 2017

@hadjiski Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-issuemaster

This comment has been minimized.

Show comment
Hide comment
@pivotal-issuemaster

pivotal-issuemaster commented Nov 29, 2017

@hadjiski Thank you for signing the Contributor License Agreement!

@hadjiski

This comment has been minimized.

Show comment
Hide comment
@hadjiski

hadjiski Dec 15, 2017

What is the process now, just waiting or am I missing something?

hadjiski commented Dec 15, 2017

What is the process now, just waiting or am I missing something?

@snicoll

This comment has been minimized.

Show comment
Hide comment
@snicoll

snicoll Dec 15, 2017

Member

@hadjiski sorry, this one got overlooked. We need a Jira issue for this change, can you please create one?

Member

snicoll commented Dec 15, 2017

@hadjiski sorry, this one got overlooked. We need a Jira issue for this change, can you please create one?

@hadjiski

This comment has been minimized.

Show comment
Hide comment
@hadjiski

hadjiski Dec 17, 2017

hadjiski commented Dec 17, 2017

@rstoyanchev

This comment has been minimized.

Show comment
Hide comment
@rstoyanchev

rstoyanchev Dec 18, 2017

Contributor

The description "Otherwise I have to..." does not match the actual change.

As far as I can see the actual change creates an overloaded withStatus method that also takes body and contentType. However the expected syntax for that is withStatus(...).body(..).conentType(..).

If you really want such a shortcut simply create your own static method and use it. I don't see a reason to add that to MockRestResponseCreators itself.

Contributor

rstoyanchev commented Dec 18, 2017

The description "Otherwise I have to..." does not match the actual change.

As far as I can see the actual change creates an overloaded withStatus method that also takes body and contentType. However the expected syntax for that is withStatus(...).body(..).conentType(..).

If you really want such a shortcut simply create your own static method and use it. I don't see a reason to add that to MockRestResponseCreators itself.

@hadjiski

This comment has been minimized.

Show comment
Hide comment
@hadjiski

hadjiski Dec 18, 2017

hadjiski commented Dec 18, 2017

@rstoyanchev

This comment has been minimized.

Show comment
Hide comment
@rstoyanchev

rstoyanchev Dec 18, 2017

Contributor

The methods provided in MockRestResponseCreators cover the most common scenarios. For anything else you still have a way, just no shortcut. Like I said it's trivial to create your own shortcut.

Contributor

rstoyanchev commented Dec 18, 2017

The methods provided in MockRestResponseCreators cover the most common scenarios. For anything else you still have a way, just no shortcut. Like I said it's trivial to create your own shortcut.

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