public class EntityTestUtils
extends java.lang.Object
Constructor and Description |
---|
EntityTestUtils() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
assertAttribute(Entity entity,
AttributeSensor<T> attribute,
com.google.common.base.Predicate<? super T> predicate) |
static void |
assertAttributeChangesEventually(Entity entity,
AttributeSensor<?> attribute)
checks that the entity's value for this attribute changes, by registering a subscription and checking the value
|
static <T> void |
assertAttributeChangesEventually2(Entity entity,
AttributeSensor<T> attribute)
alternate version of
assertAttributeChangesEventually(Entity, AttributeSensor) not using subscriptions and
with simpler code, for comparison |
static <T> void |
assertAttributeEquals(Entity entity,
AttributeSensor<T> attribute,
T expected) |
static <T> void |
assertAttributeEqualsContinually(Entity entity,
AttributeSensor<T> attribute,
T expected) |
static <T> void |
assertAttributeEqualsContinually(java.util.Map<?,?> flags,
Entity entity,
AttributeSensor<T> attribute,
T expected) |
static <T> void |
assertAttributeEqualsEventually(Entity entity,
AttributeSensor<T> attribute,
T expected) |
static <T> void |
assertAttributeEqualsEventually(java.util.Map<?,?> flags,
Entity entity,
AttributeSensor<T> attribute,
T expected) |
static <T> T |
assertAttributeEventually(Entity entity,
AttributeSensor<T> attribute,
com.google.common.base.Predicate<? super T> predicate) |
static <T> T |
assertAttributeEventually(java.util.Map<?,?> flags,
Entity entity,
AttributeSensor<T> attribute,
com.google.common.base.Predicate<? super T> predicate) |
static <T> T |
assertAttributeEventuallyNonNull(Entity entity,
AttributeSensor<T> attribute) |
static <T> T |
assertAttributeEventuallyNonNull(java.util.Map<?,?> flags,
Entity entity,
AttributeSensor<T> attribute) |
static <T> void |
assertAttributeNever(Entity entity,
AttributeSensor<T> attribute,
T... disallowed) |
static <T> void |
assertConfigEquals(Entity entity,
ConfigKey<T> configKey,
T expected) |
static void |
assertGroupSizeEqualsEventually(Group group,
int expected) |
static void |
assertGroupSizeEqualsEventually(java.util.Map<?,?> flags,
Group group,
int expected) |
static <T extends Entity> |
assertPredicateEventuallyTrue(java.util.Map<?,?> flags,
T entity,
com.google.common.base.Predicate<? super T> predicate) |
static <T extends Entity> |
assertPredicateEventuallyTrue(T entity,
com.google.common.base.Predicate<? super T> predicate) |
public static <T> void assertAttributeEquals(Entity entity, AttributeSensor<T> attribute, T expected)
public static <T> void assertConfigEquals(Entity entity, ConfigKey<T> configKey, T expected)
public static <T> void assertAttributeEqualsEventually(Entity entity, AttributeSensor<T> attribute, T expected)
public static <T> void assertAttributeEqualsEventually(java.util.Map<?,?> flags, Entity entity, AttributeSensor<T> attribute, T expected)
public static <T> T assertAttributeEventuallyNonNull(Entity entity, AttributeSensor<T> attribute)
public static <T> T assertAttributeEventuallyNonNull(java.util.Map<?,?> flags, Entity entity, AttributeSensor<T> attribute)
public static <T> T assertAttributeEventually(Entity entity, AttributeSensor<T> attribute, com.google.common.base.Predicate<? super T> predicate)
public static <T> T assertAttributeEventually(java.util.Map<?,?> flags, Entity entity, AttributeSensor<T> attribute, com.google.common.base.Predicate<? super T> predicate)
public static <T> T assertAttribute(Entity entity, AttributeSensor<T> attribute, com.google.common.base.Predicate<? super T> predicate)
public static <T extends Entity> void assertPredicateEventuallyTrue(T entity, com.google.common.base.Predicate<? super T> predicate)
public static <T extends Entity> void assertPredicateEventuallyTrue(java.util.Map<?,?> flags, T entity, com.google.common.base.Predicate<? super T> predicate)
public static <T> void assertAttributeEqualsContinually(Entity entity, AttributeSensor<T> attribute, T expected)
public static <T> void assertAttributeEqualsContinually(java.util.Map<?,?> flags, Entity entity, AttributeSensor<T> attribute, T expected)
public static void assertGroupSizeEqualsEventually(Group group, int expected)
public static void assertGroupSizeEqualsEventually(java.util.Map<?,?> flags, Group group, int expected)
public static void assertAttributeChangesEventually(Entity entity, AttributeSensor<?> attribute)
@Beta public static <T> void assertAttributeChangesEventually2(Entity entity, AttributeSensor<T> attribute)
assertAttributeChangesEventually(Entity, AttributeSensor)
not using subscriptions and
with simpler code, for comparison@Beta public static <T> void assertAttributeNever(Entity entity, AttributeSensor<T> attribute, T... disallowed)