public class TestFrameworkAssertions extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TestFrameworkAssertions.AssertionSupport
A convenience to collect multiple assertion failures.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTAINS |
static String |
EQUAL_TO |
static String |
EQUALS |
static String |
HAS_TRUTH_VALUE |
static String |
IS_EMPTY |
static String |
IS_EQUAL_TO |
static String |
IS_NULL |
static String |
MATCHES |
static String |
NOT_EMPTY |
static String |
NOT_NULL |
static String |
UNKNOWN_CONDITION |
| Modifier and Type | Method and Description |
|---|---|
static <T> void |
checkAssertions(Map<String,?> flags,
List<Map<String,Object>> assertions,
String target,
com.google.common.base.Supplier<T> actualSupplier) |
static <T> void |
checkAssertions(Map<String,?> flags,
Map<String,Object> assertions,
String target,
com.google.common.base.Supplier<T> actualSupplier) |
static <T> void |
checkAssertions(TestFrameworkAssertions.AssertionSupport support,
Map<String,?> flags,
List<Map<String,Object>> assertions,
String target,
com.google.common.base.Supplier<T> actualSupplier) |
static <T> void |
checkAssertions(TestFrameworkAssertions.AssertionSupport support,
Map<String,?> flags,
Map<String,Object> assertions,
String target,
com.google.common.base.Supplier<T> actualSupplier) |
static List<Map<String,Object>> |
getAssertions(org.apache.brooklyn.api.entity.Entity entity,
org.apache.brooklyn.config.ConfigKey<Object> key)
Get assertions tolerantly from a configuration key.
|
public static final String IS_NULL
public static final String NOT_NULL
public static final String IS_EQUAL_TO
public static final String EQUAL_TO
public static final String EQUALS
public static final String MATCHES
public static final String CONTAINS
public static final String IS_EMPTY
public static final String NOT_EMPTY
public static final String HAS_TRUTH_VALUE
public static final String UNKNOWN_CONDITION
public static List<Map<String,Object>> getAssertions(org.apache.brooklyn.api.entity.Entity entity, org.apache.brooklyn.config.ConfigKey<Object> key)
assertOut:
contains: 2 users
matches: .*[\d]* days.*
or a list of such maps, (which allows you to repeat keys):
assertOut:
- contains: 2 users
- contains: 2 days
or
private static Listpublic static <T> void checkAssertions(Map<String,?> flags, Map<String,Object> assertions, String target, com.google.common.base.Supplier<T> actualSupplier)
public static <T> void checkAssertions(Map<String,?> flags, List<Map<String,Object>> assertions, String target, com.google.common.base.Supplier<T> actualSupplier)
public static <T> void checkAssertions(TestFrameworkAssertions.AssertionSupport support, Map<String,?> flags, List<Map<String,Object>> assertions, String target, com.google.common.base.Supplier<T> actualSupplier)
Copyright © 2012–2016 The Apache Software Foundation. All rights reserved.