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

Support for cactoos matchers API #325

Open
l3r8yJ opened this issue Feb 17, 2024 · 1 comment
Open

Support for cactoos matchers API #325

l3r8yJ opened this issue Feb 17, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@l3r8yJ
Copy link
Contributor

l3r8yJ commented Feb 17, 2024

@volodya-lombrozo take a look, please. jtcop check fails with

1) Method throwsOnCollectionChange doesn't have assertion statements.
Please add at least one assertion statement to the test method.
You can also ignore the rule by adding @SuppressWarnings("JTCOP.RuleAssertionMessage") annotation.
Rule: RuleAssertionMessage.
You can read more about the rule here: https://github.com/volodya-lombrozo/jtcop/blob/main/docs/rules/no-assertions.md

on test

@Test
void throwsOnCollectionChange() {
    final Set<String> checks = new ScannedChecks().value();
    new Assertion<>(
        new FormattedText(
        "Should throw exception when trying to modify: \n\t%s",
            checks
        ).toString(),
        () -> checks.add("123"),
        new Throws<>(UnsupportedOperationException.class)
    ).affirm();
}

but it should be okay

I think it would be nice if jtcop supported cactoos-matchers, wdyt?

@volodya-lombrozo
Copy link
Owner

@l3r8yJ Yes, I agree. Thank you for reporting this bug!

@volodya-lombrozo volodya-lombrozo self-assigned this Feb 18, 2024
@volodya-lombrozo volodya-lombrozo added the bug Something isn't working label Feb 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants