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
[testing] ContextMock
(#1976)
#2038
[testing] ContextMock
(#1976)
#2038
Conversation
…linServlet implementation
# Conflicts: # javalin/src/main/java/io/javalin/config/PrivateConfig.kt # javalin/src/main/java/io/javalin/http/servlet/DefaultTasks.kt
# Conflicts: # javalin/src/main/java/io/javalin/config/PrivateConfig.kt # javalin/src/main/java/io/javalin/plugin/bundled/HttpAllowedMethodsPlugin.kt
Classic Maven incident and its inability to get the root directory for multimodule project 😔 I'll play with it tomorrow. |
# Conflicts: # javalin/src/main/java/io/javalin/config/PrivateConfig.kt
# Conflicts: # javalin/src/main/java/io/javalin/http/servlet/JavalinServlet.kt # javalin/src/main/java/io/javalin/http/servlet/JavalinServletContext.kt
I'll try to have a proper look at this in the weekend! |
# Conflicts: # javalin/src/main/java/io/javalin/plugin/bundled/DevLoggerPlugin.kt
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.
This looks really great @dzikoysk 🙌
javalin-utils/javalin-context-mock/src/main/java/io/javalin/mock/ContextMock.kt
Outdated
Show resolved
Hide resolved
javalin-utils/javalin-context-mock/src/main/java/io/javalin/mock/ContextMockConfig.kt
Show resolved
Hide resolved
javalin-utils/javalin-context-mock/src/main/java/io/javalin/mock/ContextMockConfigurer.kt
Outdated
Show resolved
Hide resolved
...ils/javalin-context-mock/src/main/java/io/javalin/mock/servlet/InMemoryHttpServletRequest.kt
Show resolved
Hide resolved
...ls/javalin-context-mock/src/main/java/io/javalin/mock/servlet/InMemoryHttpServletResponse.kt
Show resolved
Hide resolved
…ck/ContextMock.kt Co-authored-by: David (javalin.io) <davidaase@hotmail.com>
…invokeConfigWithConfigurerScope
Probably done, I mean... it's not a real req/res impl so there are definitely some differences, but I guess we can fix this on user request. The foundation seems to work quite fine :) |
Thank you for all your effort @dzikoysk, let's make sure we promote this to get some user feedback 🙌 |
Based on (& blocked by) branch from 1st PR:
Endpoint
in public API #2013I don't quite like
xxx-utils
libraries, because it's usually a garbage can for random things and no one knows what's actually there.I took a different approach and made
javalin-utils
a parent pom, wherejavalin-context-mock
is its first child module. Thanks to that, we can still encapsulate utility features within the-utils
scope in the repository, but it's effectively still granulated & independent functionality.I think it might be even a good idea to pull
javalin-utils/javalin-testtools
here, maybe with a more precise name likejavalin-okhttp-testtool
/javalin-okhttp-tester
(?)