com.netflix.eureka2.testkit.junit.EurekaMatchers Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eureka-testkit Show documentation
Show all versions of eureka-testkit Show documentation
eureka-testkit developed by Netflix
The newest version!
package com.netflix.eureka2.testkit.junit;
import com.netflix.eureka2.interests.ChangeNotification;
import com.netflix.eureka2.interests.ChangeNotification.Kind;
import com.netflix.eureka2.registry.InstanceInfo;
import com.netflix.eureka2.testkit.junit.matchers.ChangeNotificationMatcher;
import com.netflix.eureka2.testkit.junit.matchers.InstanceInfoMatcher;
import org.hamcrest.Matcher;
/**
* @author Tomasz Bak
*/
public final class EurekaMatchers {
private EurekaMatchers() {
}
public static Matcher sameInstanceInfoAs(InstanceInfo expectedValue) {
return new InstanceInfoMatcher(expectedValue, false);
}
public static Matcher identicalInstanceInfoAs(InstanceInfo expectedValue) {
return new InstanceInfoMatcher(expectedValue, true);
}
public static Matcher> addChangeNotificationOf(InstanceInfo expectedValue) {
return new ChangeNotificationMatcher(Kind.Add, expectedValue);
}
public static Matcher> modifyChangeNotificationOf(InstanceInfo expectedValue) {
return new ChangeNotificationMatcher(Kind.Modify, expectedValue);
}
public static Matcher> deleteChangeNotificationOf(InstanceInfo expectedValue) {
return new ChangeNotificationMatcher(Kind.Delete, expectedValue);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy