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

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

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

import java.awt.Component;
import org.hamcrest.Description;
import org.hamcrest.TypeSafeMatcher;

public class ComponentNameMatcher extends TypeSafeMatcher {
    private final String name;

    public ComponentNameMatcher(String name) {
        this.name = name;
    }

    @Override
    public boolean matchesSafely(Component other) {
        return name.equals(other.getName());
    }

    public void describeTo(Description description) {
        description.appendText("named ").appendValue(name);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy