Skip to content
This repository has been archived by the owner on Nov 20, 2022. It is now read-only.

Provide a 'isNotEmpty()' assertions for Multimap #9

Closed
spydesk opened this issue Jul 30, 2014 · 4 comments
Closed

Provide a 'isNotEmpty()' assertions for Multimap #9

spydesk opened this issue Jul 30, 2014 · 4 comments

Comments

@spydesk
Copy link

spydesk commented Jul 30, 2014

So we can assert :

@Test
public void test() {
    Multimap<?, ?> actual = ...;
    assertThat(actual).isNotEmpty();
}

A possible implementation in MultimapAssert:

public void isNotEmpty() {
    Objects.instance().assertNotNull(info, actual);
    if (!actual.isEmpty()) {
        throw failures.failure(info, shouldNotBeEmpty(actual));
    }
}
@joel-costigliola
Copy link
Member

I agree, that is useful.

Do you want to contribute this one ?

@spydesk
Copy link
Author

spydesk commented Jul 31, 2014

Yes, sure !

@spydesk
Copy link
Author

spydesk commented Jul 31, 2014

Pull request is ready : #10.

Let me know if it is good for you.

@joel-costigliola
Copy link
Member

Thanks !

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

No branches or pull requests

2 participants