Class MessageSelectorBuilder


  • public class MessageSelectorBuilder
    extends Object
    Constructs message selectors either from string value or from key value maps. Currently only AND logical combination of multiple expressions is supported.
    Author:
    Christoph Deppisch
    • Constructor Detail

      • MessageSelectorBuilder

        public MessageSelectorBuilder​(String selectorString)
        Constructor using fields.
        Parameters:
        selectorString -
    • Method Detail

      • build

        public static String build​(String messageSelector,
                                   Map<String,​Object> messageSelectorMap,
                                   com.consol.citrus.context.TestContext context)
        Build message selector from string expression or from key value map. Automatically replaces test variables.
        Parameters:
        messageSelector -
        messageSelectorMap -
        context -
        Returns:
      • withString

        public static MessageSelectorBuilder withString​(String selectorString)
        Static builder method using a selector string.
        Parameters:
        selectorString -
        Returns:
      • fromKeyValueMap

        public static MessageSelectorBuilder fromKeyValueMap​(Map<String,​Object> valueMap)
        Static builder method using a key value map.
        Parameters:
        valueMap -
        Returns:
      • toKeyValueMap

        public Map<String,​String> toKeyValueMap()
        Constructs a key value map from selector string representation.
        Returns:
      • build

        public String build()
        Builds the message selector.
        Returns: