helidon-io/helidon

Use Hamcrest assertions instead of JUnit

Open

#1,749 opened on May 7, 2020

 (5 comments) (0 reactions) (1 assignee)Java (609 forks)github user discovery
3.x4.xhelp wantedtesting

Repository metrics

Stars
 (3,810 stars)
PR merge metrics
 (Avg merge 12d 18h) (48 merged PRs in 30d)

Description

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

Contributor guide