Class EPAssertionUtil
java.lang.Object
com.espertech.esper.common.client.scopetest.EPAssertionUtil
Assertion methods for event processing applications.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Callback for extracting individual collection items for assertion. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
assertAllBooleanTrue
(Object[] objects) Asserts that all values in the given object array are boolean-typed values and are truestatic void
assertAllPropsSortedByName
(EventBean received, Object[] expected) Asserts that the property values of a single event, using property names as provided by the event type in sorted order by property name, match against the expected values.static void
assertContains
(String[] stringSet, String... values) Assert that a string set does contain each of one or more values.static void
assertEqualsAllowArray
(String message, Object expected, Object actual) Assert that two property values are the same, allowing arrays as properties.static void
assertEqualsAnyOrder
(int[] expected, int[] actual) Compare the two integer arrays allowing any order.static void
assertEqualsAnyOrder
(int[] expected, Set<Integer> actual) Assert that each integer value in the expected array is contained in the actual array.static void
assertEqualsAnyOrder
(EventBean[][] expected, EventBean[][] actual) Compare two 2-dimensional event arrays.static void
assertEqualsAnyOrder
(Object[] expected, Object[] actual) Compare the two object arrays allowing any order.static void
assertEqualsExactOrder
(boolean[] expected, boolean[] actual) Compare the boolean values in the two bool arrays assuming the exact same order.static void
assertEqualsExactOrder
(int[] expected, int[] actual) Compare the integer values in the two int arrays assuming the exact same order.static void
assertEqualsExactOrder
(int[] expected, Integer[] actual) Compare the integer values in the two int arrays assuming the exact same order.static void
assertEqualsExactOrder
(long[] expected, long[] actual) Compare the long values in the long arrays assuming the exact same order.static void
assertEqualsExactOrder
(short[] expected, short[] actual) Compare the short values in the two short arrays assuming the exact same order.static void
assertEqualsExactOrder
(EventBean[] expected, Iterator<EventBean> actual) Compare the iterator-returned events against the expected eventsstatic void
assertEqualsExactOrder
(Object[][] actual, String[] propertyNames, Object[][] expected) Compare two 2-dimensional arrays, and using property names for messages, against expected values.static void
assertEqualsExactOrder
(Object[][] expected, List<Object[]> actual) Compare the objects in the 2-dimension object arrays assuming the exact same order.static void
assertEqualsExactOrder
(Object[] expected, Object[] actual) Compare the objects in the two object arrays assuming the exact same order.static void
assertEqualsExactOrder
(Object[] expected, Collection actual) Compare the objects in the expected arrays and actual collection assuming the exact same order.static void
assertEqualsExactOrder
(Object[] expected, Iterator actual) Compare the objects returned by the iterator to the an object array.static void
assertEqualsExactOrder
(String[][] expected, String[][] actual) Deep compare two 2-dimensional string arrays for the exact same length of arrays and order.static void
assertEqualsExactOrder
(String[] expected, String[] actual) Compare the String values in the two String arrays assuming the exact same order.static void
assertEqualsExactOrder
(String message, Object[] expected, Object[] actual) Compare the objects in the two object arrays assuming the exact same order.static void
assertEqualsExactOrder
(Collection<Object[]> actual, String[] propertyNames, Object[][] expected) Compare the collection of object arrays, and using property names for messages, against expected values.static void
assertEqualsExactOrderUnderlying
(Object[] expected, EventBean[] actual) Comparing the underlying events to the expected events using equals-semantics.static void
assertEqualsExactOrderUnderlying
(Object[] expected, Iterator<EventBean> actual) Compare the underlying events returned by the iterator to the expected values.static void
assertEqualsIgnoreNewline
(String expected, String received) Compare two strings removing all newline characters.static void
assertMapOfCollection
(Map map, String[] keys, String[] expectedList, EPAssertionUtil.AssertionCollectionValueString collectionValue) Assert that a map of collections (Map<String, Collection>) has expected keys and values.static void
assertNameValuePairs
(EventBean[] lastData, Object[][] namesAndValues) Assert that the event properties match the name-value pairs for each eventstatic void
assertNotContains
(String[] stringSet, String... values) Assert that a string set does not contain one or more values.static void
assertProps
(EventBean received, String[] propertyNames, Object[] expected) Assert that the property values of a single event match the expected values.static void
assertProps
(EventBean received, Map<String, Object> expected) Assert that the event properties of the event match the properties provided by the map, taking the map properties as the comparison source.static void
assertProps
(UniformPair<EventBean> received, String[] propertyNames, Object[] expectedInsert, Object[] expectedRemoved) Assert that the property values of a new event and a removed event match the expected insert and removed values.static void
assertProps
(Object received, String[] propertyNames, Object[] expected) Assert that property values, wherein the row can either be a Map or a POJO object, matches the expected values.static void
assertPropsAllValuesSame
(EventBean received, String[] propertyNames, Object expected) Assert that all properties of an event have the same value as passed in.static void
assertPropsMap
(Map received, String[] propertyNames, Object... expected) Compare the values of a Map against the expected values.static void
assertPropsObjectArray
(Object[] received, String[] propertyNames, Object... expected) Compare the values of a object array (single row) against the expected values.static void
assertPropsPerRow
(EventBean[] received, String[] propertyNames, Object[][] expected) Compare the property values of events with the expected values, using exact-order semantics.static void
assertPropsPerRow
(EventBean[] actual, String[] propertyNames, Object[][] expected, String streamName) Compare the property values of events with the expected values, using exact-order semantics.static void
Compare properties of events against a list of maps.static void
assertPropsPerRow
(UniformPair<EventBean[]> received, String[] propertyNames, Object[][] expectedInsert, Object[][] expectedRemoved) Assert that the property values of a new event and a removed event match the expected insert and removed values.static void
assertPropsPerRow
(UniformPair<EventBean[]> received, String propertyName, Object[] expectedInsert, Object[] expectedRemoved) Assert that the property values of the events (insert and remove pair) match the expected insert and removed values for a single property.static void
assertPropsPerRow
(Object[] received, String[] propertyNames, Object[][] expected) Assert that property values of rows, wherein each row can either be Map or POJO objects, matches the expected values.static void
assertPropsPerRow
(Iterator<EventBean> iterator, SafeIterator<EventBean> safeIterator, String[] propertyNames, Object[][] expected) Compare the property values returned by events of both iterators with the expected values, using exact-order semantics.static void
assertPropsPerRow
(Iterator<EventBean> iterator, String[] propertyNames, Object[][] expected) Compare the property values returned by events of both iterators with the expected values, using exact-order semantics.static void
Compare properties of events against a list of maps.static void
assertPropsPerRow
(List<Object[]> received, String[] propertyNames, Object[][] expected) Assert that property values of rows, wherein each row can either be Map or POJO objects, matches the expected values.static void
assertPropsPerRow
(Map[] actual, String[] propertyNames, Object[][] expected) Compare the Map values identified by property names against expected values.static void
assertPropsPerRowAnyOrder
(EventBean[] actual, String[] propertyNames, Object[][] expected) Compare the property values of events with the expected values, using any-order semantics.static void
assertPropsPerRowAnyOrder
(SafeIterator<EventBean> safeIterator, String[] propertyNames, Object[][] expected) Compare the property values returned by events of the iterator with the expected values, using any-order semantics.static void
assertPropsPerRowAnyOrder
(UniformPair<EventBean[]> pair, String[] propertyNames, Object[][] expectedNew, Object[][] expectedOld) Compare property values for insert and remove stream pairstatic void
assertPropsPerRowAnyOrder
(Iterator<EventBean> iterator, SafeIterator<EventBean> safeIterator, String[] propertyNames, Object[][] expected) Compare the property values returned by events of both iterators with the expected values, using any-order semantics.static void
assertPropsPerRowAnyOrder
(Iterator<EventBean> iterator, String[] propertyNames, Object[][] expected) Compare the property values returned by events of the iterator with the expected values, using any-order semantics.static void
assertSameAnyOrder
(Object[][] expected, Object[][] actual) Compare two 2-dimensional object arrays using reference-equals semantics.static void
assertSameExactOrder
(Object[] expected, Object[] actual) Reference-equals the objects in the two object arrays assuming the exact same order.static void
assertTypeEqualsAnyOrder
(Class[] classes, Object[] objects) Assert the class of the objects in the object array matches the expected classes in the classes array.static void
assertUnderlyingPerRow
(UniformPair<EventBean[]> received, Object[] expectedUnderlyingInsert, Object[] expectedUnderlyingRemove) Assert that the underlying objects of the events (insert and remove pair) match the expected insert and removed objects.static boolean
compareEqualsExactOrder
(EventBean[] actual, EventBean[] expected) Compare the events in the two object arrays assuming the exact same order.static boolean
compareRefExactOrder
(Object[] actual, Object[] expected) Reference-compare the objects in the two object arrays assuming the exact same order.static Object[]
concatenateArray
(Object[]... more) Concatenate multiple arrays.static Object[]
concatenateArray
(Object[] srcOne, Object[] srcTwo) Concatenate two arrays.static Object[][]
concatenateArray2Dim
(Object[][] first, Object[][]... more) Concatenate two arrays.static Object[]
eventsToObjectArr
(EventBean[] events, String propertyName) Extract the property value of the event property for the given events and return an object array of values.static Object[][]
eventsToObjectArr
(EventBean[] events, String[] propertyNames) Extract the property value of the event properties for the given events and return an object array of values.static Object[]
getUnderlying
(EventBean[] events) Return an array of underlying objects for an array of events.static <T> int
iteratorCount
(Iterator<T> iterator) Count the number of object provided by an iterator.static EventBean[]
iteratorToArray
(Iterator<EventBean> iterator) Convert an iterator of event beans to an array of event beans.static Object[]
iteratorToArrayUnderlying
(Iterator<EventBean> iterator) Convert an iterator of event beans to an array of underlying objects.static Object[]
iteratorToObjectArr
(Iterator<EventBean> iterator, String propertyName) Extract the property value of the event property for the given events and return an object array of values.static Object[][]
iteratorToObjectArr
(Iterator<EventBean> iterator, String[] propertyNames) Extract the property value of the event properties for the given events and return an object array of values.static EventBean[]
Sort events according to natural ordering of the values or a property.static EventBean[]
Sort events according to natural ordering of the values or a property.static Object[]
toObjectArray
(Object array) For a given array, copy the array elements into a new array of Object[] type.
-
Constructor Details
-
EPAssertionUtil
public EPAssertionUtil()
-
-
Method Details
-
assertEqualsExactOrder
Deep compare two 2-dimensional string arrays for the exact same length of arrays and order.- Parameters:
expected
- is the expected valuesactual
- is the actual values
-
assertEqualsExactOrder
public static void assertEqualsExactOrder(Object[][] actual, String[] propertyNames, Object[][] expected) Compare two 2-dimensional arrays, and using property names for messages, against expected values.- Parameters:
actual
- array of objectspropertyNames
- property namesexpected
- expected values
-
assertEqualsExactOrder
public static void assertEqualsExactOrder(Collection<Object[]> actual, String[] propertyNames, Object[][] expected) Compare the collection of object arrays, and using property names for messages, against expected values.- Parameters:
actual
- colleciton of array of objectspropertyNames
- property namesexpected
- expected values
-
assertEqualsExactOrder
Compare the iterator-returned events against the expected events- Parameters:
expected
- is the expected valuesactual
- is the actual values
-
assertEqualsExactOrderUnderlying
Compare the underlying events returned by the iterator to the expected values.- Parameters:
expected
- is the expected valuesactual
- is the actual values
-
assertEqualsExactOrderUnderlying
Comparing the underlying events to the expected events using equals-semantics.- Parameters:
expected
- is the expected valuesactual
- is the actual values
-
assertEqualsExactOrder
Compare the objects in the 2-dimension object arrays assuming the exact same order.- Parameters:
expected
- is the expected valuesactual
- is the actual values
-
assertEqualsExactOrder
Compare the objects in the two object arrays assuming the exact same order.- Parameters:
expected
- is the expected valuesactual
- is the actual values
-
assertEqualsExactOrder
Compare the objects in the two object arrays assuming the exact same order.- Parameters:
expected
- is the expected valuesactual
- is the actual valuesmessage
- an optional message that can be output when assrtion fails
-
assertEqualsExactOrder
Compare the objects in the expected arrays and actual collection assuming the exact same order.- Parameters:
expected
- is the expected valuesactual
- is the actual values
-
assertSameExactOrder
Reference-equals the objects in the two object arrays assuming the exact same order.- Parameters:
expected
- is the expected valuesactual
- is the actual values
-
assertEqualsExactOrder
public static void assertEqualsExactOrder(int[] expected, int[] actual) Compare the integer values in the two int arrays assuming the exact same order.- Parameters:
expected
- is the expected valuesactual
- is the actual values
-
assertEqualsExactOrder
Compare the integer values in the two int arrays assuming the exact same order.- Parameters:
expected
- is the expected valuesactual
- is the actual values
-
assertEqualsExactOrder
public static void assertEqualsExactOrder(short[] expected, short[] actual) Compare the short values in the two short arrays assuming the exact same order.- Parameters:
expected
- is the expected valuesactual
- is the actual values
-
assertEqualsExactOrder
public static void assertEqualsExactOrder(long[] expected, long[] actual) Compare the long values in the long arrays assuming the exact same order.- Parameters:
expected
- is the expected valuesactual
- is the actual values
-
assertEqualsExactOrder
Compare the String values in the two String arrays assuming the exact same order.- Parameters:
expected
- is the expected valuesactual
- is the actual values
-
assertEqualsExactOrder
public static void assertEqualsExactOrder(boolean[] expected, boolean[] actual) Compare the boolean values in the two bool arrays assuming the exact same order.- Parameters:
expected
- is the expected valuesactual
- is the actual values
-
assertEqualsExactOrder
Compare the objects returned by the iterator to the an object array.- Parameters:
expected
- is the expected valuesactual
- is the actual values
-
assertEqualsAnyOrder
Assert that each integer value in the expected array is contained in the actual array.- Parameters:
expected
- is the expected valuesactual
- is the actual values
-
assertEqualsAnyOrder
public static void assertEqualsAnyOrder(int[] expected, int[] actual) Compare the two integer arrays allowing any order.- Parameters:
expected
- is the expected valuesactual
- is the actual values
-
assertEqualsAnyOrder
Compare the two object arrays allowing any order.- Parameters:
expected
- is the expected valuesactual
- is the actual values
-
assertPropsPerRow
public static void assertPropsPerRow(Iterator<EventBean> iterator, SafeIterator<EventBean> safeIterator, String[] propertyNames, Object[][] expected) Compare the property values returned by events of both iterators with the expected values, using exact-order semantics.- Parameters:
iterator
- provides eventssafeIterator
- provides eventspropertyNames
- array of property namesexpected
- expected values
-
assertPropsPerRowAnyOrder
public static void assertPropsPerRowAnyOrder(Iterator<EventBean> iterator, SafeIterator<EventBean> safeIterator, String[] propertyNames, Object[][] expected) Compare the property values returned by events of both iterators with the expected values, using any-order semantics.- Parameters:
iterator
- provides eventssafeIterator
- provides eventspropertyNames
- array of property namesexpected
- expected values
-
assertPropsPerRowAnyOrder
public static void assertPropsPerRowAnyOrder(UniformPair<EventBean[]> pair, String[] propertyNames, Object[][] expectedNew, Object[][] expectedOld) Compare property values for insert and remove stream pair- Parameters:
pair
- pairpropertyNames
- namesexpectedNew
- expected insert-stream valuesexpectedOld
- expected remove-stream values
-
assertPropsPerRowAnyOrder
public static void assertPropsPerRowAnyOrder(SafeIterator<EventBean> safeIterator, String[] propertyNames, Object[][] expected) Compare the property values returned by events of the iterator with the expected values, using any-order semantics.- Parameters:
safeIterator
- provides eventspropertyNames
- array of property namesexpected
- expected values
-
assertPropsPerRowAnyOrder
public static void assertPropsPerRowAnyOrder(Iterator<EventBean> iterator, String[] propertyNames, Object[][] expected) Compare the property values returned by events of the iterator with the expected values, using any-order semantics.- Parameters:
iterator
- provides eventspropertyNames
- array of property namesexpected
- expected values
-
assertPropsPerRow
public static void assertPropsPerRow(Iterator<EventBean> iterator, String[] propertyNames, Object[][] expected) Compare the property values returned by events of both iterators with the expected values, using exact-order semantics.- Parameters:
iterator
- provides eventspropertyNames
- array of property namesexpected
- expected values
-
assertPropsPerRow
Compare the Map values identified by property names against expected values.- Parameters:
actual
- array of Maps, one for each rowpropertyNames
- property namesexpected
- expected values
-
assertPropsPerRow
public static void assertPropsPerRow(EventBean[] received, String[] propertyNames, Object[][] expected) Compare the property values of events with the expected values, using exact-order semantics.- Parameters:
received
- provides eventspropertyNames
- array of property namesexpected
- expected values
-
assertPropsPerRow
public static void assertPropsPerRow(EventBean[] actual, String[] propertyNames, Object[][] expected, String streamName) Compare the property values of events with the expected values, using exact-order semantics.- Parameters:
actual
- provides eventspropertyNames
- array of property namesexpected
- expected valuesstreamName
- an optional name for the stream for use in messages
-
assertPropsPerRowAnyOrder
public static void assertPropsPerRowAnyOrder(EventBean[] actual, String[] propertyNames, Object[][] expected) Compare the property values of events with the expected values, using any-order semantics.- Parameters:
actual
- provides eventspropertyNames
- array of property namesexpected
- expected values
-
assertProps
Assert that the property values of a single event match the expected values.- Parameters:
received
- provides eventspropertyNames
- array of property namesexpected
- expected values
-
assertProps
public static void assertProps(UniformPair<EventBean> received, String[] propertyNames, Object[] expectedInsert, Object[] expectedRemoved) Assert that the property values of a new event and a removed event match the expected insert and removed values.- Parameters:
received
- provides eventspropertyNames
- array of property namesexpectedInsert
- expected values insert streamexpectedRemoved
- expected values remove stream
-
assertPropsPerRow
public static void assertPropsPerRow(UniformPair<EventBean[]> received, String[] propertyNames, Object[][] expectedInsert, Object[][] expectedRemoved) Assert that the property values of a new event and a removed event match the expected insert and removed values.- Parameters:
received
- provides eventspropertyNames
- array of property namesexpectedInsert
- expected values insert streamexpectedRemoved
- expected values remove stream
-
assertPropsPerRow
public static void assertPropsPerRow(UniformPair<EventBean[]> received, String propertyName, Object[] expectedInsert, Object[] expectedRemoved) Assert that the property values of the events (insert and remove pair) match the expected insert and removed values for a single property.- Parameters:
received
- provides eventspropertyName
- property nameexpectedInsert
- expected values insert streamexpectedRemoved
- expected values remove stream
-
assertUnderlyingPerRow
public static void assertUnderlyingPerRow(UniformPair<EventBean[]> received, Object[] expectedUnderlyingInsert, Object[] expectedUnderlyingRemove) Assert that the underlying objects of the events (insert and remove pair) match the expected insert and removed objects.- Parameters:
received
- provides eventsexpectedUnderlyingInsert
- expected underlying object insert streamexpectedUnderlyingRemove
- expected underlying object remove stream
-
assertAllPropsSortedByName
Asserts that the property values of a single event, using property names as provided by the event type in sorted order by property name, match against the expected values.- Parameters:
received
- provides eventsexpected
- expected values
-
assertPropsMap
Compare the values of a Map against the expected values.- Parameters:
received
- provides propertiesexpected
- expected valuespropertyNames
- property names to assert
-
assertPropsObjectArray
public static void assertPropsObjectArray(Object[] received, String[] propertyNames, Object... expected) Compare the values of a object array (single row) against the expected values.- Parameters:
received
- provides propertiesexpected
- expected valuespropertyNames
- property names to assert
-
assertEqualsAnyOrder
Compare two 2-dimensional event arrays.- Parameters:
expected
- expected valuesactual
- actual values
-
assertSameAnyOrder
Compare two 2-dimensional object arrays using reference-equals semantics.- Parameters:
expected
- expected valuesactual
- actual values
-
assertAllBooleanTrue
Asserts that all values in the given object array are boolean-typed values and are true- Parameters:
objects
- values to assert that they are all true
-
assertTypeEqualsAnyOrder
Assert the class of the objects in the object array matches the expected classes in the classes array.- Parameters:
classes
- is the expected classobjects
- is the objects to check the class for
-
iteratorToArray
Convert an iterator of event beans to an array of event beans.- Parameters:
iterator
- to convert- Returns:
- array of events
-
iteratorToArrayUnderlying
Convert an iterator of event beans to an array of underlying objects.- Parameters:
iterator
- to convert- Returns:
- array of event underlying objects
-
iteratorCount
Count the number of object provided by an iterator.- Type Parameters:
T
- type- Parameters:
iterator
- to count- Returns:
- count
-
assertPropsPerRow
Compare properties of events against a list of maps.- Parameters:
received
- actual eventsexpected
- expected values
-
assertPropsPerRow
public static void assertPropsPerRow(Iterator<EventBean> iterator, List<Map<String, Object>> expected) Compare properties of events against a list of maps.- Parameters:
iterator
- actual eventsexpected
- expected values
-
concatenateArray
Concatenate two arrays.- Parameters:
srcOne
- array to concatenatesrcTwo
- array to concatenate- Returns:
- concatenated array
-
concatenateArray2Dim
Concatenate two arrays.- Parameters:
first
- array to concatenatemore
- array to concatenate- Returns:
- concatenated array
-
concatenateArray
Concatenate multiple arrays.- Parameters:
more
- arrays to concatenate- Returns:
- concatenated array
-
sort
Sort events according to natural ordering of the values or a property.- Parameters:
events
- to sortproperty
- name of property providing sort values- Returns:
- sorted array
-
sort
Sort events according to natural ordering of the values or a property.- Parameters:
events
- to sortproperty
- name of property providing sort values- Returns:
- sorted array
-
assertNotContains
Assert that a string set does not contain one or more values.- Parameters:
stringSet
- to compare againstvalues
- to find
-
assertContains
Assert that a string set does contain each of one or more values.- Parameters:
stringSet
- to compare againstvalues
- to find
-
getUnderlying
Return an array of underlying objects for an array of events.- Parameters:
events
- to return underlying objects- Returns:
- events
-
assertPropsAllValuesSame
public static void assertPropsAllValuesSame(EventBean received, String[] propertyNames, Object expected) Assert that all properties of an event have the same value as passed in.- Parameters:
received
- to inspectpropertyNames
- property namesexpected
- value
-
eventsToObjectArr
Extract the property value of the event property for the given events and return an object array of values.- Parameters:
events
- to extract value frompropertyName
- name of property to extract values for- Returns:
- value object array
-
eventsToObjectArr
Extract the property value of the event properties for the given events and return an object array of values.- Parameters:
events
- to extract value frompropertyNames
- names of properties to extract values for- Returns:
- value object array
-
iteratorToObjectArr
Extract the property value of the event property for the given events and return an object array of values.- Parameters:
iterator
- events to extract value frompropertyName
- name of property to extract values for- Returns:
- value object array
-
iteratorToObjectArr
Extract the property value of the event properties for the given events and return an object array of values.- Parameters:
iterator
- events to extract value frompropertyNames
- names of properties to extract values for- Returns:
- value object array
-
compareEqualsExactOrder
Compare the events in the two object arrays assuming the exact same order.- Parameters:
actual
- is the actual resultsexpected
- is the expected values- Returns:
- indicate whether compared successfully
-
compareRefExactOrder
Reference-compare the objects in the two object arrays assuming the exact same order.- Parameters:
actual
- is the actual resultsexpected
- is the expected values- Returns:
- indicate whether compared successfully
-
assertPropsPerRow
public static void assertPropsPerRow(Object[] received, String[] propertyNames, Object[][] expected) Assert that property values of rows, wherein each row can either be Map or POJO objects, matches the expected values.- Parameters:
received
- array of objects may contain Map and POJO eventspropertyNames
- property namesexpected
- expected value
-
assertPropsPerRow
public static void assertPropsPerRow(List<Object[]> received, String[] propertyNames, Object[][] expected) Assert that property values of rows, wherein each row can either be Map or POJO objects, matches the expected values.- Parameters:
received
- array of objects may contain Map and POJO eventspropertyNames
- property namesexpected
- expected value
-
assertProps
Assert that property values, wherein the row can either be a Map or a POJO object, matches the expected values.- Parameters:
received
- Map or POJOpropertyNames
- property namesexpected
- expected value
-
toObjectArray
For a given array, copy the array elements into a new array of Object[] type.- Parameters:
array
- input array- Returns:
- object array
-
assertEqualsAllowArray
Assert that two property values are the same, allowing arrays as properties.- Parameters:
message
- to useexpected
- expected valueactual
- actual value
-
assertProps
Assert that the event properties of the event match the properties provided by the map, taking the map properties as the comparison source.- Parameters:
received
- eventexpected
- expected values
-
assertEqualsIgnoreNewline
Compare two strings removing all newline characters.- Parameters:
expected
- expected valuereceived
- received value
-
assertMapOfCollection
public static void assertMapOfCollection(Map map, String[] keys, String[] expectedList, EPAssertionUtil.AssertionCollectionValueString collectionValue) Assert that a map of collections (Map<String, Collection>) has expected keys and values.- Parameters:
map
- of string keys and collection-type valueskeys
- array of key valuesexpectedList
- for each key a string that is a comma-separated list of valuescollectionValue
- the function to apply to each collection value to convert to a string
-
assertNameValuePairs
Assert that the event properties match the name-value pairs for each event- Parameters:
lastData
- array of eventsnamesAndValues
- array of pairs with the first element the event property name and the second element the expected value
-