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

Increase code coverage #51

Open
aesteve opened this issue Nov 27, 2015 · 0 comments
Open

Increase code coverage #51

aesteve opened this issue Nov 27, 2015 · 0 comments
Assignees
Milestone

Comments

@aesteve
Copy link
Owner

aesteve commented Nov 27, 2015

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

  • CONNECT
  • TRACE
  • HEAD

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 %

@aesteve aesteve self-assigned this Nov 27, 2015
@aesteve aesteve added this to the 0.1 milestone Nov 27, 2015
@aesteve aesteve modified the milestones: 0.1, 1.1 Dec 21, 2015
@aesteve aesteve modified the milestones: 2.0, 1.1 Apr 23, 2016
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

1 participant