org.terracotta.context.extended
Class ExtendedMatchers

java.lang.Object
  extended by org.terracotta.context.extended.ExtendedMatchers

public final class ExtendedMatchers
extends Object

Matchers specific to standard extended properties


Method Summary
static Matcher<Map<String,Object>> hasProperty(String key)
          Returns a matcher that checks if the "properties" attribute contains an entry for key.
static Matcher<Map<String,Object>> hasProperty(String key, String value)
          Returns a matcher that checks if the "properties" attribute contains an entry for key and a value equals to value.
static Matcher<Map<String,Object>> hasTag(String tag)
          Returns a matcher that checks if the "tags" attribute contains the tag.
static Matcher<Map<String,Object>> hasTags(Collection<String> tags)
          Returns a matcher that checks if the "tags" attribute contains all the tags.
static Matcher<Map<String,Object>> hasTags(String... tags)
          Returns a matcher that checks if the "tags" attribute contains all the tags.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

hasTag

public static Matcher<Map<String,Object>> hasTag(String tag)
Returns a matcher that checks if the "tags" attribute contains the tag.

Parameters:
tag - tag searched
Returns:
a Map<String, Object> matcher for the tag

hasTags

public static Matcher<Map<String,Object>> hasTags(String... tags)
Returns a matcher that checks if the "tags" attribute contains all the tags.

Parameters:
tags - tags searched
Returns:
a Map<String, Object> matcher for the tags

hasTags

public static Matcher<Map<String,Object>> hasTags(Collection<String> tags)
Returns a matcher that checks if the "tags" attribute contains all the tags.

Parameters:
tags - tags searched
Returns:
a Map<String, Object> matcher for the tags

hasProperty

public static Matcher<Map<String,Object>> hasProperty(String key)
Returns a matcher that checks if the "properties" attribute contains an entry for key.

Parameters:
key - key searched
Returns:
a Map<String, Object> matcher for the key

hasProperty

public static Matcher<Map<String,Object>> hasProperty(String key,
                                                      String value)
Returns a matcher that checks if the "properties" attribute contains an entry for key and a value equals to value.

Parameters:
key - key searched
value - value searched
Returns:
a Map<String, Object> matcher for the key and value


Copyright © 2017. All rights reserved.