/** * Await until an instance field matches something. E.g. * <p> * <pre> * await().until(fieldIn(service).ofType(int.class).andWithName("fieldName"), greaterThan(2)); * </pre> * <p> * Here Awaitility waits until a field with name <code>fieldName</code> and of the <code>int.class</code> * in object <code>service</code> is greater than 2. * <p> * Note that the field must be thread-safe in order to guarantee correct behavior. * * @param object The object that contains the field. * @return A field supplier builder which lets you specify the parameters needed to find the field. */ public static FieldSupplierBuilder fieldIn(Object object) { return new FieldSupplierBuilder(object); }
/** * Await until a static field matches something. E.g. * <p> * <pre> * await().until(fieldIn(Service.class).ofType(int.class).andWithName("fieldName"), greaterThan(2)); * </pre> * <p> * Here Awaitility waits until a static field with name <code>fieldName</code> and of the * <code>int.class</code> in object <code>service</code> is greater than 2. * <p> * Note that the field must be thread-safe in order to guarantee correct behavior. * * @param clazz The class that contains the static field. * @return A field supplier builder which lets you specify the parameters needed to find the field. */ public static FieldSupplierBuilder fieldIn(Class<?> clazz) { return new FieldSupplierBuilder(clazz); } }
/** * Await until a static field matches something. E.g. * <p> * <pre> * await().until(fieldIn(Service.class).ofType(int.class).andWithName("fieldName"), greaterThan(2)); * </pre> * <p> * Here Awaitility waits until a static field with name <code>fieldName</code> and of the * <code>int.class</code> in object <code>service</code> is greater than 2. * <p> * Note that the field must be thread-safe in order to guarantee correct behavior. * * @param clazz The class that contains the static field. * @return A field supplier builder which lets you specify the parameters needed to find the field. */ public static FieldSupplierBuilder fieldIn(Class<?> clazz) { return new FieldSupplierBuilder(clazz); } }
/** * Await until an instance field matches something. E.g. * <p> * <pre> * await().until(fieldIn(service).ofType(int.class).andWithName("fieldName"), greaterThan(2)); * </pre> * <p> * Here Awaitility waits until a field with name <code>fieldName</code> and of the <code>int.class</code> * in object <code>service</code> is greater than 2. * <p> * Note that the field must be thread-safe in order to guarantee correct behavior. * * @param object The object that contains the field. * @return A field supplier builder which lets you specify the parameters needed to find the field. */ public static FieldSupplierBuilder fieldIn(Object object) { return new FieldSupplierBuilder(object); }