All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.objogate.wl.swing.matcher.EmptyCollectionMatcher Maven / Gradle / Ivy

The newest version!
package com.objogate.wl.swing.matcher;

import java.util.Collection;
import org.hamcrest.Description;
import org.hamcrest.Factory;
import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeMatcher;

public class EmptyCollectionMatcher> extends TypeSafeMatcher {
    @Override
    public boolean matchesSafely(C c) {
        return c.isEmpty();
    }

    public void describeTo(Description description) {
        description.appendText("an empty collection");
    }

    @Factory
    public static > Matcher isEmpty() {
        return new EmptyCollectionMatcher();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy