helidon-io/helidon

Use Hamcrest assertions instead of JUnit

Aperta

#1749 aperta il 7 mag 2020

 (5 commenti) (0 reazioni) (1 assegnatario)Java (610 fork)github user discovery
3.x4.xhelp wantedtesting

Metriche repository

Star
 (3811 stelle)
Metriche merge PR
 (Merge medio 12g 18h) (48 PR mergiate in 30 g)

Descrizione

Environment Details

  • Helidon Version: 2.0.0
  • Whole code base

Problem Description

Currently we have a few tests that still use JUnit assertions, such as assertEquals(actual, expected, "Test a and b are equal") all of these should be replaced with Hamcrest, such as: assertThat("Test a and b are equal", actual, is(expected)))

There are a few assertions we can use: fail("") assertAll() assertThrows

  • archetypes/se/target/test-classes/projects/it1/project/it1
  • archetypes/se/target/test-classes/projects/it2/project/it2
  • archetypes/se/target/test-classes/projects/it3/project/it3
  • common/common
  • common/http
  • common/reactive
  • config/encryption
  • config/object-mapping
  • dbclient/jdbc
  • dbclient/mongodb
  • examples/cors
  • examples/employee-app
  • examples/microprofile/hello-world-implicit
  • examples/microprofile/mp1_1-static-content
  • examples/microprofile/openapi-basic
  • examples/openapi
  • examples/quickstarts/helidon-quickstart-mp
  • examples/quickstarts/helidon-quickstart-se
  • examples/quickstarts/helidon-standalone-quickstart-mp
  • examples/quickstarts/helidon-standalone-quickstart-se
  • examples/webserver/basics
  • examples/webserver/comment-aas
  • examples/webserver/jersey
  • examples/webserver/tutorial
  • integrations/cdi/common-cdi/reference-counted-context
  • integrations/cdi/datasource-hikaricp
  • integrations/cdi/datasource-ucp
  • integrations/cdi/eclipselink-cdi
  • integrations/cdi/jpa-cdi
  • integrations/cdi/jpa-weld
  • integrations/cdi/jta-cdi
  • integrations/cdi/jta-weld
  • integrations/cdi/oci-objectstorage-cdi
  • media/common
  • messaging/kafka
  • messaging/messaging
  • metrics/metrics
  • microprofile/config
  • microprofile/fault-tolerance
  • microprofile/jwt-auth
  • microprofile/messaging
  • microprofile/reactive-streams
  • microprofile/openapi
  • microprofile/websocket
  • openapi
  • security/providers/oidc-common
  • tests/apps/bookstore/bookstore-mp
  • tests/apps/bookstore/bookstore-se
  • tests/apps/bookstore/common
  • tests/integration/kafka
  • tests/integration/mp-ws-services
  • tests/integration/native-image/se-1
  • tests/integration/webclient
  • webserver/jersey
  • webserver/tyrus

Guida contributor