expectedMessage types for SOAP and JMS in detail
Ben edited this page Sep 29, 2016
·
12 revisions
Where references below are made to sections (e.g. see section Operators) these can all be found on the README
1. {path: 'path.to.element', equals: operator - see section Operators}
Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testRootElement xmlns="http://www.testing.com/integration/event">
<elementOne>hello</elementOne>
</testRootElement>
var expectedMessage = [
{path: 'testRootElement.elementOne', equals: 'hello'}
];
var expectedMessage = [
{path: 'testRootElement.elementOne', equals: /^hel/}
];
2. {path: 'path.to.element', equals: /regex containing utc-timezone or local-timezone/, dateFormat: 'see section Date Format'}
Example (local timezone):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testRootElement xmlns="http://www.testing.com/integration/event">
<elementOne>YYYY-MM-DDT18:39:00.896+11:00</elementOne>
</testRootElement>
// where YYYY-MM-DD is today's date
var expectedMessage = [
{path: 'testRootElement.elementOne', equals: /local-timezoneT\d\d:\d\d:\d\d\.\d\d\d\+\d\d:\d\d/, dateFormat: 'YYYY-MM-DD'}
];
// local-timezone will be translated to the local date in the format specified in dateFormat.
Example (UTC time):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testRootElement xmlns="http://www.testing.com/integration/event">
<elementOne>T18:39:00.896+11:00 MMMM YYYY</elementOne>
</testRootElement>
// where MMMM is the current month (e.g. January) and YYYY is the current year
var expectedMessage = [
{path: 'testRootElement.elementOne', equals: /T\d\d:\d\d:\d\d\.\d\d\d\+\d\d:\d\d utc-timezone/, dateFormat: 'MMMM YYYY'}
];
// utc-timezone will be translated to the utc date in the format specified in dateFormat.
The dateFormat
uses Moment.js tokens (more on this under Date Format).
3. {path: 'path.to.element', contains: 'string' or integer}
Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testRootElement xmlns="http://www.testing.com/integration/event">
<elementOne>h3llo mr howl</elementOne>
</testRootElement>
var expectedMessage = [
{path: 'testRootElement.elementOne', contains: 'howl'}
];
var expectedMessage = [
{path: 'testRootElement.elementOne', contains: 3}
];
4. {path: 'path.to.element', attribute: 'attribute name', equals: operator - see section Operators}
Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testRootElement xmlns="http://www.testing.com/integration/event">
<elementOne attribute1="123456">hello</elementOne>
</testRootElement>
var expectedMessage = [
{path: 'testRootElement.elementOne', attribute: 'attribute1', equals: '{integer}'}
];
var expectedMessage = [
{path: 'testRootElement.elementOne', attribute: 'attribute1', equals: 123456}
];
var expectedMessage = [
{path: 'testRootElement.elementOne', attribute: 'attribute1', equals: '123456'}
];
5. {path: 'path.to.element', attribute: 'attribute name', equals: /regex containing utc-timezone or local-timezone/, dateFormat: 'see section Date Format'}
Example (local timezone):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testRootElement xmlns="http://www.testing.com/integration/event">
<elementOne attributeContainingDateTimestamp="YYYY-MM-DDT18:39:00.896+11:00">hello</elementOne>
</testRootElement>
// where YYYY-MM-DD is today's date
var expectedMessage = [
{path: 'testRootElement.elementOne', attribute: 'attributeContainingDateTimestamp', equals: /local-timezoneT\d\d:\d\d:\d\d\.\d\d\d\+\d\d:\d\d/, dateFormat: 'YYYY-MM-DD'}
];
// local-timezone will be translated to the local date in the format specified in dateFormat.
Example (UTC time):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testRootElement xmlns="http://www.testing.com/integration/event">
<elementOne attributeContainingDateTimestamp="T18:39:00.896+11:00 MMMM YYYY">hello</elementOne>
</testRootElement>
// where MMMM is the current month (e.g. January) and YYYY is the current year
var expectedMessage = [
{path: 'testRootElement.elementOne', attribute: 'attributeContainingDateTimestamp', equals: /T\d\d:\d\d:\d\d\.\d\d\d\+\d\d:\d\d utc-timezone/, dateFormat: 'MMMM YYYY'}
];
// utc-timezone will be translated to the utc date in the format specified in dateFormat.
The dateFormat
uses Moment.js tokens (more on this under Date Format).
6. {path: 'path.to.element', attribute: 'attribute name', contains: 'string' or integer}
Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testRootElement xmlns="http://www.testing.com/integration/event">
<elementOne attribute1="brilliant name for an attribute" attribute2="123456">hello</elementOne>
</testRootElement>
var expectedMessage = [
{path: 'testRootElement.elementOne', attribute: 'attribute1', contains: 'brilliant'}
];
var expectedMessage = [
{path: 'testRootElement.elementOne', attribute: 'attribute2', contains: 34}
];
7. {path: 'path.to.element', pathShouldNotExist: true}
Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testRootElement xmlns="http://www.testing.com/integration/event">
<elementOne attribute1="brilliant name for an attribute" attribute2="123456">hello</elementOne>
</testRootElement>
var expectedMessage = [
{path: 'testRootElement.elementTwo', pathShouldNotExist: true}
];
1. {parentPath: 'path to parent of child element', element: 'element name', elementPosition: integer > 0, equals: operator - see section Operators}
Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testRootElement xmlns="http://www.testing.com/integration/event">
<elementOne>hello</elementOne>
<elementTwo>its</elementTwo>
<elementOne>me</elementOne>
<elementTwo>ben</elementTwo>
</testRootElement>
var expectedMessage = [
{parentPath: 'testRootElement', element: 'elementOne', elementPosition: 3, equals: 'me'}
];
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testRootElement xmlns="http://www.testing.com/integration/event">
<anotherElement>
<elementOne>hello</elementOne>
<elementTwo>its</elementTwo>
<elementOne>me</elementOne>
<elementTwo>ben</elementTwo>
<anotherElement>
</testRootElement>
var expectedMessage = [
{parentPath: 'testRootElement.anotherElement', element: 'elementOne', elementPosition: 3, equals: 'me'}
];
2. {parentPath: 'path to parent of child element', element: 'element name', elementPosition: integer > 0, equals: /regex containing utc-timezone or local-timezone/, dateFormat: 'see section Date Format'}
Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testRootElement xmlns="http://www.testing.com/integration/event">
<elementOne>YYYY-MM-DDT18:39:00.896+11:00</elementOne>
<elementTwo>YYYY-MM-DDT18:39:00.896+11:00</elementTwo>
<elementOne>DD-MM-YYYYT18:39:00.896+11:00</elementOne>
<elementTwo>YYYY-MM-DDT18:39:00.896+11:00</elementTwo>
</testRootElement>
var expectedMessage = [
{parentPath: 'testRootElement', element: 'elementOne', elementPosition: 3, equals: /local-timezoneT\d\d:\d\d:\d\d\.\d\d\d\+\d\d:\d\d/, dateFormat: 'DD-MM-YYYY'}
];
// where DD-MM-YYYY is today's date
// local-timezone will be translated to the local date in the format specified in dateFormat. Specify utc-timezone if the date is UTC.
The dateFormat
uses Moment.js tokens (more on this under Date Format).
3. {parentPath: 'path to parent of child element', element: 'element name', elementPosition: integer > 0, contains: 'string' or integer}
Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testRootElement xmlns="http://www.testing.com/integration/event">
<elementOne>hello</elementOne>
<elementTwo>its</elementTwo>
<elementOne>me</elementOne>
<elementTwo>ben</elementTwo>
</testRootElement>
var expectedMessage = [
{parentPath: 'testRootElement', element: 'elementOne', elementPosition: 3, contains: 'me'},
{parentPath: 'testRootElement', element: 'elementTwo', elementPosition: 4, contains: 'be'}
];
4. {parentPath: 'path to parent of child element', element: 'element name', elementPosition: integer > 0, attribute: 'attribute name', equals: operator - see section Operators}
Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testRootElement xmlns="http://www.testing.com/integration/event">
<elementOne attribute1="123">not interested in this value</elementOne>
<elementTwo attribute1="1234">not interested in this value</elementTwo>
<elementOne attribute1="12345">not interested in this value</elementOne>
<elementTwo attribute1="123456">not interested in this value</elementTwo>
</testRootElement>
var expectedMessage = [
{parentPath: 'testRootElement', element: 'elementOne', elementPosition: 3, attribute: 'attribute1', equals: 12345}
];
5. {parentPath: 'path to parent of child element', element: 'element name', elementPosition: integer > 0, attribute: 'attribute name', equals: /regex containing utc-timezone or local-timezone/, dateFormat: 'see section Date Format'}
Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testRootElement xmlns="http://www.testing.com/integration/event">
<elementOne attribute1="YYYY-MM-DDT18:39:00.896+11:00">not interested in this value</elementOne>
<elementTwo attribute1="YYYY-MM-DDT18:39:00.896+11:00">not interested in this value</elementTwo>
<elementOne attribute1="DD-MM-YYYYT18:39:00.896+11:00">not interested in this value</elementOne>
<elementTwo attribute1="YYYY-MM-DDT18:39:00.896+11:00">not interested in this value</elementTwo>
</testRootElement>
var expectedMessage = [
{parentPath: 'testRootElement', element: 'elementOne', elementPosition: 3, attribute: 'attribute1', equals: /local-timezoneT\d\d:\d\d:\d\d\.\d\d\d\+\d\d:\d\d/, dateFormat: 'DD-MM-YYYY'}
];
// where DD-MM-YYYY is today's date
// local-timezone will be translated to the local date in the format specified in dateFormat. Specify utc-timezone if the date is UTC.
The dateFormat
uses Moment.js tokens (more on this under Date Format).
6. {parentPath: 'path to parent of child element', element: 'element name', elementPosition: integer > 0, attribute: 'attribute name', contains: 'string' or integer}
Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testRootElement xmlns="http://www.testing.com/integration/event">
<elementOne attribute1="123">not interested in this value</elementOne>
<elementTwo attribute1="1234">not interested in this value</elementTwo>
<elementOne attribute1="12345">not interested in this value</elementOne>
<elementTwo attribute1="123456">not interested in this value</elementTwo>
</testRootElement>
var expectedMessage = [
{parentPath: 'testRootElement', element: 'elementOne', elementPosition: 3, attribute: 'attribute1', contains: 2345}
];
1. {repeatingGroup: {path: 'path to element containing repeating group', repeater: 'repeating group name', number: integer - occurrence}, path: 'element name', equals: operator - see section Operators}
Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testRootElement xmlns="http://www.testing.com/integration/event">
<elementOne>
<thingContainingRepeatingGroups>
<RepeatingGroup>
<fieldOneOfRepeatingGroup>10001</fieldOneOfRepeatingGroup>
<fieldTwoOfRepeatingGroup>hello</fieldTwoOfRepeatingGroup>
</RepeatingGroup>
<RepeatingGroup>
<fieldOneOfRepeatingGroup>10002</fieldOneOfRepeatingGroup>
<fieldTwoOfRepeatingGroup>goodbye</fieldTwoOfRepeatingGroup>
</RepeatingGroup>
</thingContainingRepeatingGroups>
</elementOne>
</testRootElement>
var expectedMessage = [
{repeatingGroup: {path: 'testRootElement.elementOne.thingContainingRepeatingGroups', repeater: 'RepeatingGroup', number: 1}, path: 'fieldOneOfRepeatingGroup', equals: 10002},
{repeatingGroup: {path: 'testRootElement.elementOne.thingContainingRepeatingGroups', repeater: 'RepeatingGroup', number: 1}, path: 'fieldTwoOfRepeatingGroup', equals: 'hello'},
{repeatingGroup: {path: 'testRootElement.elementOne.thingContainingRepeatingGroups', repeater: 'RepeatingGroup', number: 2}, path: 'fieldOneOfRepeatingGroup', equals: '{integer}'},
{repeatingGroup: {path: 'testRootElement.elementOne.thingContainingRepeatingGroups', repeater: 'RepeatingGroup', number: 2}, path: 'fieldTwoOfRepeatingGroup', equals: '{alpha}'}
];
2. {repeatingGroup: {path: 'path to element containing repeating group', repeater: 'repeating group name', number: integer - occurrence}, path: 'element name', equals: /regex containing utc-timezone or local-timezone/, dateFormat: 'see section Date Format'}**
Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testRootElement xmlns="http://www.testing.com/integration/event">
<elementOne>
<thingContainingRepeatingGroups>
<RepeatingGroup>
<fieldOneOfRepeatingGroup>YYYY-MM-DDT18:39:00.896+11:00</fieldOneOfRepeatingGroup>
</RepeatingGroup>
<RepeatingGroup>
<fieldOneOfRepeatingGroup>T18:39:00.896+11:00 DD-MM-YYYY</fieldOneOfRepeatingGroup>
</RepeatingGroup>
</thingContainingRepeatingGroups>
</elementOne>
</testRootElement>
// where YYYY-MM-DD is today's date (local) and DD-MM-YYYY is today's date (UTC)
var expectedMessage = [
{repeatingGroup: {path: 'testRootElement.elementOne.thingContainingRepeatingGroups', repeater: 'RepeatingGroup', number: 1}, path: 'fieldOneOfRepeatingGroup', equals: /local-timezoneT\d\d:\d\d:\d\d\.\d\d\d\+\d\d:\d\d/, dateFormat: 'YYYY-MM-DD'},
{repeatingGroup: {path: 'testRootElement.elementOne.thingContainingRepeatingGroups', repeater: 'RepeatingGroup', number: 1}, path: 'fieldOneOfRepeatingGroup', equals: /T\d\d:\d\d:\d\d\.\d\d\d\+\d\d:\d\d utc-timezone/, dateFormat: 'DD-MM-YYYY'},
];
// local-timezone and utc-timezone will be translated to the local date and utc date respectively in the format specified in the dateFormat attributes.
3. {repeatingGroup: {path: 'path to element containing repeating group', repeater: 'repeating group name', number: integer - occurrence}, path: 'element name', contains: 'string' or integer}
Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testRootElement xmlns="http://www.testing.com/integration/event">
<elementOne>
<thingContainingRepeatingGroups>
<RepeatingGroup>
<fieldOneOfRepeatingGroup>10001</fieldOneOfRepeatingGroup>
</RepeatingGroup>
<RepeatingGroup>
<fieldOneOfRepeatingGroup>hello mr howl</fieldOneOfRepeatingGroup>
</RepeatingGroup>
</thingContainingRepeatingGroups>
</elementOne>
</testRootElement>
var expectedMessage = [
{repeatingGroup: {path: 'testRootElement.elementOne.thingContainingRepeatingGroups', repeater: 'RepeatingGroup', number: 1}, path: 'fieldOneOfRepeatingGroup', contains: 100},
{repeatingGroup: {path: 'testRootElement.elementOne.thingContainingRepeatingGroups', repeater: 'RepeatingGroup', number: 2}, path: 'fieldOneOfRepeatingGroup', equals: 'howl'},
];
4. {repeatingGroup: {path: 'path to element containing repeating group', repeater: 'repeating group name', number: integer - occurrence}, path: 'element name', attribute: 'attribute name', equals: operator - see section Operators}
Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testRootElement xmlns="http://www.testing.com/integration/event">
<elementOne>
<thingContainingRepeatingGroups>
<RepeatingGroup>
<fieldOneOfRepeatingGroup testAttribute1="toffee">not interested in this value</fieldOneOfRepeatingGroup>
<fieldTwoOfRepeatingGroup testAttribute2="chocolate">not interested in this value</fieldTwoOfRepeatingGroup>
</RepeatingGroup>
<RepeatingGroup>
<fieldOneOfRepeatingGroup testAttribute1="tea">not interested in this value</fieldOneOfRepeatingGroup>
<fieldTwoOfRepeatingGroup testAttribute2="coffee">not interested in this value</fieldTwoOfRepeatingGroup>
</RepeatingGroup>
</thingContainingRepeatingGroups>
</elementOne>
</testRootElement>
var expectedMessage = [
{repeatingGroup: {path: 'testRootElement.elementOne.thingContainingRepeatingGroups', repeater: 'RepeatingGroup', number: 1}, path: 'fieldOneOfRepeatingGroup', attribute: 'attribute1', equals: 'toffee'},
{repeatingGroup: {path: 'testRootElement.elementOne.thingContainingRepeatingGroups', repeater: 'RepeatingGroup', number: 1}, path: 'fieldTwoOfRepeatingGroup', attribute: 'attribute2', equals: 'chocolate'},
{repeatingGroup: {path: 'testRootElement.elementOne.thingContainingRepeatingGroups', repeater: 'RepeatingGroup', number: 2}, path: 'fieldOneOfRepeatingGroup', attribute: 'attribute1', equals: 'tea'},
{repeatingGroup: {path: 'testRootElement.elementOne.thingContainingRepeatingGroups', repeater: 'RepeatingGroup', number: 2}, path: 'fieldTwoOfRepeatingGroup', attribute: 'attribute2', equals: 'coffee'}
];
5. {repeatingGroup: {path: 'path to element containing repeating group', repeater: 'repeating group name', number: integer - occurrence}, path: 'element name', attribute: 'attribute name', equals: /regex containing utc-timezone or local-timezone/, dateFormat: 'see section Date Format'}
Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testRootElement xmlns="http://www.testing.com/integration/event">
<elementOne>
<thingContainingRepeatingGroups>
<RepeatingGroup>
<fieldOneOfRepeatingGroup testAttribute1="YYYY-MM-DDT18:39:00.896+11:00">not interested in this value</fieldOneOfRepeatingGroup>
</RepeatingGroup>
<RepeatingGroup>
<fieldOneOfRepeatingGroup testAttribute1="T18:39:00.896+11:00 DD-MM-YYYY">not interested in this value</fieldOneOfRepeatingGroup>
</RepeatingGroup>
</thingContainingRepeatingGroups>
</elementOne>
</testRootElement>
// where YYYY-MM-DD is today's date (local) and DD-MM-YYYY is today's date (UTC)
var expectedMessage = [
{repeatingGroup: {path: 'testRootElement.elementOne.thingContainingRepeatingGroups', repeater: 'RepeatingGroup', number: 1}, path: 'fieldOneOfRepeatingGroup', attribute: 'attribute1', equals: /local-timezoneT\d\d:\d\d:\d\d\.\d\d\d\+\d\d:\d\d/, dateFormat:'YYYY-MM-DD'},
{repeatingGroup: {path: 'testRootElement.elementOne.thingContainingRepeatingGroups', repeater: 'RepeatingGroup', number: 2}, path: 'fieldOneOfRepeatingGroup', attribute: 'attribute1', equals: /T\d\d:\d\d:\d\d\.\d\d\d\+\d\d:\d\d utc-timezone/, dateFormat:'DD-MM-YYYY'}
];
// local-timezone and utc-timezone will be translated to the local date and utc date respectively in the format specified in the dateFormat attributes.
6. {repeatingGroup: {path: 'path to element containing repeating group', repeater: 'repeating group name', number: integer - occurrence}, path: 'element name', attribute: 'attribute name', contains: 'string' or integer}
Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testRootElement xmlns="http://www.testing.com/integration/event">
<elementOne>
<thingContainingRepeatingGroups>
<RepeatingGroup>
<fieldOneOfRepeatingGroup testAttribute1="toffee">not interested in this value</fieldOneOfRepeatingGroup>
<fieldTwoOfRepeatingGroup testAttribute2="123">not interested in this value</fieldTwoOfRepeatingGroup>
</RepeatingGroup>
<RepeatingGroup>
<fieldOneOfRepeatingGroup testAttribute1="tea">not interested in this value</fieldOneOfRepeatingGroup>
<fieldTwoOfRepeatingGroup testAttribute2="123">not interested in this value</fieldTwoOfRepeatingGroup>
</RepeatingGroup>
</thingContainingRepeatingGroups>
</elementOne>
</testRootElement>
var expectedMessage = [
{repeatingGroup: {path: 'testRootElement.elementOne.thingContainingRepeatingGroups', repeater: 'RepeatingGroup', number: 1}, path: 'fieldOneOfRepeatingGroup', attribute: 'attribute1', contains: 'toffee'},
{repeatingGroup: {path: 'testRootElement.elementOne.thingContainingRepeatingGroups', repeater: 'RepeatingGroup', number: 1}, path: 'fieldTwoOfRepeatingGroup', attribute: 'attribute2', contains: 123},
{repeatingGroup: {path: 'testRootElement.elementOne.thingContainingRepeatingGroups', repeater: 'RepeatingGroup', number: 2}, path: 'fieldOneOfRepeatingGroup', attribute: 'attribute1', contains: 'ea'},
{repeatingGroup: {path: 'testRootElement.elementOne.thingContainingRepeatingGroups', repeater: 'RepeatingGroup', number: 2}, path: 'fieldTwoOfRepeatingGroup', attribute: 'attribute2', contains: 2}
];
7. {repeatingGroup: {path: 'path to element containing repeating group', repeater: 'repeating group name', number: integer - occurrence}, path: 'element name', pathShouldNotExist: true}
Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testRootElement xmlns="http://www.testing.com/integration/event">
<elementOne>
<thingContainingRepeatingGroups>
<RepeatingGroup>
<fieldOneOfRepeatingGroup>10001</fieldOneOfRepeatingGroup>
</RepeatingGroup>
<RepeatingGroup>
<fieldOneOfRepeatingGroup>hello mr howl</fieldOneOfRepeatingGroup>
</RepeatingGroup>
</thingContainingRepeatingGroups>
</elementOne>
</testRootElement>
var expectedMessage = [
{repeatingGroup: {path: 'testRootElement.elementOne.thingContainingRepeatingGroups', repeater: 'RepeatingGroup', number: 1}, path: 'fieldTwoOfRepeatingGroup', pathShouldNotExist: true}
];
1. { repeatingGroupHasElements: {
path: 'path to element containing repeating group',
repeater: 'repeating group name'},
elements: [
{ path: 'element name', equals: operator - see section Operators },
{ path: 'element name', equals: operator - see section Operators }
]
}
}
Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testRootElement xmlns="http://www.testing.com/integration/event">
<elementOne>
<thingContainingRepeatingGroups>
<RepeatingGroup>
<fieldOneOfRepeatingGroup>10001</fieldOneOfRepeatingGroup>
<fieldTwoOfRepeatingGroup>hello</fieldTwoOfRepeatingGroup>
</RepeatingGroup>
<RepeatingGroup>
<fieldOneOfRepeatingGroup>10002</fieldOneOfRepeatingGroup>
<fieldTwoOfRepeatingGroup>goodbye</fieldTwoOfRepeatingGroup>
</RepeatingGroup>
</thingContainingRepeatingGroups>
</elementOne>
</testRootElement>
var expectedMessage = [
{
repeatingGroupHasElements: {
path: 'testRootElement.elementOne.thingContainingRepeatingGroups',
repeater: 'RepeatingGroup',
elements: [
{ path: 'fieldOneOfRepeatingGroup', equals: 10002 },
{ path: 'fieldTwoOfRepeatingGroup', equals: 'goodbye' }
]
}
}
];
2. {repeatingGroupHasElements: {
path: 'path to element containing repeating group',
repeater: 'repeating group name'},
elements: [
{ path: 'element name', equals: /regex containing utc-timezone or local-timezone/, dateFormat: 'see section Date Format'},
{ path: 'element name', equals: /regex containing utc-timezone or local-timezone/, dateFormat: 'see section Date Format'}
]
}
}
Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testRootElement xmlns="http://www.testing.com/integration/event">
<elementOne>
<thingContainingRepeatingGroups>
<RepeatingGroup>
<fieldOneOfRepeatingGroup>` + currentLocalDate + `T18:39:00.896+11:00</fieldOneOfRepeatingGroup>
<fieldTwoOfRepeatingGroup>` + currentLocalDate + `T18:39:00.896+11:01</fieldTwoOfRepeatingGroup>
</RepeatingGroup>
<RepeatingGroup>
<fieldOneOfRepeatingGroup>T18:39:00.896+11:00 ` + currentUtcDate + `</fieldOneOfRepeatingGroup>
<fieldTwoOfRepeatingGroup>T18:39:00.896+11:01 ` + currentUtcDate + `</fieldTwoOfRepeatingGroup>
</RepeatingGroup>
</thingContainingRepeatingGroups>
</elementOne>
</testRootElement>
var expectedMessage = [
{
repeatingGroupHasElements: {
path: 'testRootElement.elementOne.thingContainingRepeatingGroups',
repeater: 'RepeatingGroup',
elements: [
{ path: 'fieldOneOfRepeatingGroup', equals: /T\d\d:\d\d:\d\d\.\d\d\d\+\d\d:\d\d utc-timezone/, dateFormat: 'DD-MM-YYYY' },
{ path: 'fieldTwoOfRepeatingGroup', equals: /T\d\d:\d\d:\d\d\.\d\d\d\+\d\d:\d\d utc-timezone/, dateFormat: 'DD-MM-YYYY' }
]
}
}
];
3. {repeatingGroupHasElements: {
path: 'path to element containing repeating group',
repeater: 'repeating group name'},
elements: [
{ path: 'element name', contains: 'string' or integer},
{ path: 'element name', contains: 'string' or integer}
]
}
}
Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testRootElement xmlns="http://www.testing.com/integration/event">
<elementOne>
<thingContainingRepeatingGroups>
<RepeatingGroup>
<fieldOneOfRepeatingGroup>10001</fieldOneOfRepeatingGroup>
<fieldTwoOfRepeatingGroup>hello mr howl</fieldTwoOfRepeatingGroup>
</RepeatingGroup>
<RepeatingGroup>
<fieldOneOfRepeatingGroup>goodbye mr howl</fieldOneOfRepeatingGroup>
<fieldTwoOfRepeatingGroup>10002</fieldTwoOfRepeatingGroup>
</RepeatingGroup>
</thingContainingRepeatingGroups>
</elementOne>
</testRootElement>
var expectedMessage = [
{
repeatingGroupHasElements: {
path: 'testRootElement.elementOne.thingContainingRepeatingGroups',
repeater: 'RepeatingGroup',
elements: [
{ path: 'fieldOneOfRepeatingGroup', contains: 'goodbye mr' },
{ path: 'fieldTwoOfRepeatingGroup', contains: 2 }
]
}
}
];
4. {repeatingGroupHasElements: {
path: 'path to element containing repeating group',
repeater: 'repeating group name'},
elements: [
{ path: 'element name', attribute: 'attribute name', equals: operator - see section Operators},
{ path: 'element name', attribute: 'attribute name', equals: operator - see section Operators}
]
}
}
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testRootElement xmlns="http://www.testing.com/integration/event">
<elementOne>
<thingContainingRepeatingGroups>
<RepeatingGroup>
<fieldOneOfRepeatingGroup testAttribute1="toffee">not interested in this value</fieldOneOfRepeatingGroup>
<fieldTwoOfRepeatingGroup testAttribute2="chocolate">not interested in this value</fieldTwoOfRepeatingGroup>
</RepeatingGroup>
<RepeatingGroup>
<fieldOneOfRepeatingGroup testAttribute1="tea">not interested in this value</fieldOneOfRepeatingGroup>
<fieldTwoOfRepeatingGroup testAttribute2="coffee">not interested in this value</fieldTwoOfRepeatingGroup>
</RepeatingGroup>
</thingContainingRepeatingGroups>
</elementOne>
</testRootElement>
var expectedMessage = [
{
repeatingGroupHasElements: {
path: 'testRootElement.elementOne.thingContainingRepeatingGroups',
repeater: 'RepeatingGroup',
elements: [
{ path: 'fieldOneOfRepeatingGroup', attribute: 'testAttribute1', equals: 'tea'},
{ path: 'fieldTwoOfRepeatingGroup', attribute: 'testAttribute2', equals: 'coffee'}
]
}
}
];
5. {repeatingGroupHasElements: {
path: 'path to element containing repeating group',
repeater: 'repeating group name'},
elements: [
{ path: 'element name', attribute: 'attribute name', equals: /regex containing utc-timezone or local-timezone/, dateFormat: 'see section Date Format'},
{ path: 'element name', attribute: 'attribute name', equals: /regex containing utc-timezone or local-timezone/, dateFormat: 'see section Date Format'}
]
}
}
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testRootElement xmlns="http://www.testing.com/integration/event">
<elementOne>
<thingContainingRepeatingGroups>
<RepeatingGroup>
<fieldOneOfRepeatingGroup testAttribute1="` + localDate + `T18:39:00.896+11:00">not interested in this value</fieldOneOfRepeatingGroup>
<fieldTwoOfRepeatingGroup testAttribute1="` + localDate + `T18:39:00.896+11:01">not interested in this value</fieldTwoOfRepeatingGroup>
</RepeatingGroup>
<RepeatingGroup>
<fieldOneOfRepeatingGroup testAttribute1="T18:39:00.896+11:00 ` + utcDate + `">not interested in this value</fieldOneOfRepeatingGroup>
<fieldTwoOfRepeatingGroup testAttribute1="T18:39:00.896+11:01 ` + utcDate + `">not interested in this value</fieldTwoOfRepeatingGroup>
</RepeatingGroup>
</thingContainingRepeatingGroups>
</elementOne>
</testRootElement>
var expectedMessage = [
{
repeatingGroupHasElements: {
path: 'testRootElement.elementOne.thingContainingRepeatingGroups',
repeater: 'RepeatingGroup',
elements: [
{ path: 'fieldOneOfRepeatingGroup', attribute: 'testAttribute1', equals: /local-timezoneT\d\d:\d\d:\d\d\.\d\d\d\+\d\d:\d\d/, dateFormat: 'YYYY-MM-DD'},
{ path: 'fieldTwoOfRepeatingGroup', attribute: 'testAttribute1', equals: /local-timezoneT\d\d:\d\d:\d\d\.\d\d\d\+\d\d:\d\d/, dateFormat: 'YYYY-MM-DD'},
]
}
}
];
6. {repeatingGroupHasElements: {
path: 'path to element containing repeating group',
repeater: 'repeating group name'},
elements: [
{ path: 'element name', attribute: 'attribute name', contains: 'string' or integer}
{ path: 'element name', attribute: 'attribute name', contains: 'string' or integer}
]
}
}
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testRootElement xmlns="http://www.testing.com/integration/event">
<elementOne>
<thingContainingRepeatingGroups>
<RepeatingGroup>
<fieldOneOfRepeatingGroup testAttribute1="toffee">not interested in this value</fieldOneOfRepeatingGroup>
<fieldTwoOfRepeatingGroup testAttribute2="123">not interested in this value</fieldTwoOfRepeatingGroup>
</RepeatingGroup>
<RepeatingGroup>
<fieldOneOfRepeatingGroup testAttribute1="tea">not interested in this value</fieldOneOfRepeatingGroup>
<fieldTwoOfRepeatingGroup testAttribute2="123">not interested in this value</fieldTwoOfRepeatingGroup>
</RepeatingGroup>
</thingContainingRepeatingGroups>
</elementOne>
</testRootElement>
var expectedMessage = [
{
repeatingGroupHasElements: {
path: 'testRootElement.elementOne.thingContainingRepeatingGroups',
repeater: 'RepeatingGroup',
elements: [
{ path: 'fieldOneOfRepeatingGroup', attribute: 'testAttribute1', contains: 'ea'},
{ path: 'fieldTwoOfRepeatingGroup', attribute: 'testAttribute2', contains: 2}
]
}
}
];