Skip to content

Add hasNullValue and doesNotHaveNullValue to AtomicReferenceAssert #2969

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

Closed

Conversation

0x1306e6d
Copy link

Check List:

Following the contributing guidelines will make it easier for us to review and accept your PR.

hasNullValue and doesNotHaveNullValue will be useful for checking whether an AtomicReference has the null value or not. These are shortcuts of hasVallue(null) and doesNotHaveValue(null) and would be useful when using package which non-null is the default since IDE may warn that hasVallue(null) receives null.

Copy link
Member

@joel-costigliola joel-costigliola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ghkim3221, first round of code review done.

import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.assertj.core.error.ShouldNotContainValue.shouldNotContainValue;

class AtomicReferenceAssert_doesNotHaveNullValue_Test {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you follow the testing guidelines documented in https://github.com/assertj/assertj/blob/main/CONTRIBUTING.md notably using GIVEN WHEN THEN and AssertionUtil.expectAssertionError.

this comment applies to the other test too, thanks!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure!! thanks.

@joel-costigliola joel-costigliola added this to the 3.25.0 milestone Mar 2, 2023
@joel-costigliola
Copy link
Member

Integrated thanks @ghkim3221!

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

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy