-
-
Notifications
You must be signed in to change notification settings - Fork 129
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
feat(Response): expose method to reset the response #346
Conversation
/** | ||
* @author munendrasn | ||
*/ | ||
@RunWith(MockitoJUnitRunner.class) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that we need this annotation. This annotation is useful if you use mock annotation, for example
@Mock
private HttpServletResponse servletResponse;
instead of
private HttpServletResponse servletResponse = mock(HttpServletResponse.class);
import javax.servlet.http.HttpServletResponse; | ||
|
||
import java.nio.charset.StandardCharsets; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra empty line (please use optimize import from IntelliJ for example)
I am happy to see unit test code. |
@decebals , But, this doesn't reset headers, cookies in |
@decebals,
This is required because on calling
httpServletResponse.reset()
, only response gets reset. But other params like headers, cookies also need to erased fromResponse
class