See jacocoTestReport for more infos :
Errors
NotFound, Validation, ... And also RuntimeException marshalling in
json
xml
- plainText
- http status (
context.fail(400) in XML)
DateUtils
- unit tests (with TimeZone)
PaginationContext
Wrong configuration
the right error is thrown at startup (or use Objects.requireNonNull)
User-defined stuff :
register custom param adapter and test it's called / used
his own failure handler is called
- his own auth method is called
register adapter
registerAnnotatedParamInjector
his own locale resolver is called
add paramHandler
Test NubesServer
Services
wrong method parameters => error should be thrown at bootstrap, not during runtime
periodic task method with parameters
Param injection
no cookie set => 400
get Cookie object, not cookie value
RequestBody : throw exceptions instead of returning null ? + test JsonObject + test JsonArray
Params : test 400 if wrong params / Param (same) / Header (same)
Headers : not a multimap => 500
LocalMap : by param name (no annotation value)
EventBus
HttpServerRequest
User locale
ResourceBundle
Http methods
Processors
- NoopAfterAllProcessor is not used, use it in a custom-defined Processor (see above)
- CheckAuthority with no user set => 401
- CheckToken (auth) with wrong formated auth data => 400
- RoutingContext failed before method is invoked (in filter, ...)
Integ. testing on AsyncUtils
- nextOrFail(context)
- onFailureOnly
- onSuccessOnly
- failOr(context)
Auth
- JWT
- redirect with no redirectURL => breaks at bootstrap not at runtime
EventBusBridgeFactory / SocketFactory
- path with
/path/* but also with /path and /path/
- Vertx injected as method param
- controller can't be instanciated => error at startup, not at runtime (same for standard controllers)
RouteFactory
- filters from superclass are executed
VerticleFactory
@InheritsConfig => the config is inherited properly
Injection
- Fields from superclass are injected (or filters from superclass)
TemplateEngineManager
- no template handler found => should throw an exception and test it
Current coverage : 1918 / 7957 76 %
Current coverage : 1 427 of 7 959 82 %
Current coverage : 1 124 of 7 998 86 %
See
jacocoTestReportfor more infos :Errors
NotFound, Validation, ... And also RuntimeException marshalling in
jsonxmlcontext.fail(400)in XML)DateUtils
PaginationContextWrong configuration
the right error is thrown at startup (or useObjects.requireNonNull)User-defined stuff :
register custom param adapter and test it's called / usedhis own failure handler is calledregister adapterregisterAnnotatedParamInjectorhis own locale resolver is calledadd paramHandlerTest NubesServerServiceswrong method parameters => error should be thrown at bootstrap, not during runtimeperiodic task method with parametersParam injectionno cookie set => 400get Cookie object, not cookie valueRequestBody : throw exceptions instead of returning null ? + test JsonObject + test JsonArrayParams : test 400 if wrong params / Param (same) / Header (same)Headers : not a multimap => 500LocalMap : by param name (no annotation value)EventBusHttpServerRequestUser localeResourceBundleHttp methods
Processors
Integ. testing on AsyncUtils
Auth
EventBusBridgeFactory / SocketFactory
/path/*but also with/pathand/path/RouteFactory
VerticleFactory
@InheritsConfig=> the config is inherited properlyInjection
TemplateEngineManager
Current coverage : 1918 / 7957 76 %Current coverage : 1 427 of 7 959 82 %Current coverage : 1 124 of 7 998 86 %