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

PreferAssertj disallows assert statements in test code. #1052

Merged
merged 3 commits into from
Nov 18, 2019

Conversation

carterkozak
Copy link
Contributor

==COMMIT_MSG==
PreferAssertj disallows assert statements in test code.

Tests should use more specific AssertJ checks, which cannot be disabled by turning off asserts. Arguably the assert keyword should never be used, preferring preconditions allowing production environments to avoid invoking code paths that are impossible to test.
==COMMIT_MSG==

@changelog-app
Copy link

changelog-app bot commented Nov 18, 2019

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

PreferAssertj disallows assert statements in test code.

Tests should use more specific AssertJ checks, which cannot be disabled by turning off asserts. Arguably the assert keyword should never be used, preferring preconditions. This way production environments cannot reach code paths that are impossible to test.

Check the box to generate changelog(s)

  • Generate changelog entry

@bulldozer-bot bulldozer-bot bot merged commit 9d421dd into develop Nov 18, 2019
@bulldozer-bot bulldozer-bot bot deleted the ckozak/PreferAssertj_asserts_in_test_code branch November 18, 2019 19:00
@svc-autorelease
Copy link
Collaborator

Released 2.32.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants